Excel
Excel
SPREADSHEETS
5.1 SPREADSHEET – AN OVERVIEW
A spreadsheet is a document that stores data in a grid of horizontal rows and vertical
columns. Spreadsheets are primarily used to work with numbers and text. A spreadsheet is
divided into a series of rows and columns to store the information. Rows are typically
labeled using numbers (1, 2, 3, etc.), while columns are labeled with letters (A, B, C, etc.).
Individual row/column locations, such as C3 or B12, are referred to as cells. In a spreadsheet
application, each value sits in a cell. The relationships between cells are called formulas, and
the names of the cells are called labels.
Once you have defined the cells and the formulas for linking them together, you can
enter your data. You can then modify selected values to see how all the other values change
accordingly.
Most spreadsheet applications are multidimensional, meaning that you can link one
spreadsheet to another. A three-dimensional spreadsheet, for example, is like a stack of
spreadsheets all connected by formulas. A change made in one spreadsheet automatically
affects other spreadsheets. The most popular examples of this type of software are Lotus,
MS-Excel.
Note: A spreadsheet document is often called a worksheet.
It provides a standard grid, which may be scrolled and zoomed. Text, numeric or
date values or formulas may be entered into the selected cell through the formula
bar at the top of the screen.
Cells may be formatted using the format pages, which let you specify the font style,
borders, text and background colors, the size of cells and text alignment within the
cells.
Spreadsheet provides support for multiple sheets within a workbook. When you
press the worksheet button, worksheets are presented in a horizontally scrollable
page, allowing you to quickly flick between all the worksheets in the workbook.
A worksheet may be selected simply by tapping on it. You can create new
worksheets and delete or rename existing worksheets.
Spreadsheet provides the ability to search the worksheet for any phrase, number or
other text, letting you easily scroll between search results. It is also possible to sort a
range of cells by any row or column.
Spreadsheet supports a variety of functions used to perform basic calculations based
on parameters set by the user.
Spreadsheets can be integrated for use with other software programs. One example
is a mail merge. A spreadsheet can be created with the names and addresses of
various individuals, and a mail merge can be used to fill in text boxes into form
letters.
Data in spreadsheets can be displayed in a graphic form. Spreadsheets allow the
numerical data in the cells to be displayed as a graph or chart.
This grid is the most important part of the Excel window. It's where you will
perform all your work, such as entering data, writing formulas, and reviewing the
results.
Quick Acce s s tool
bar Titl
e bar
Fil
e Tab Ribbon H el
p
Nam e box
Col
um n bar Form ul
a bar
Row bar
Sh e e tTabs
Sh e e tAre a
Status bar Vie w Buttons Z oom Control
s
Columns are identified with letters (A, B, C ….), while rows are identified with numbers
(1, 2, 3 ….).
The worksheets in turn are grouped together into a workbook. By default each
workbook in Excel 2010 contains 3 blank worksheets, which are identified by tabs
displaying along the bottom of your screen. The first worksheet is called Sheet1, the next is
Sheet2 and so on as shown below:
Cells are the basic building blocks of a worksheet. Each rectangle in a worksheet is
called a cell. A cell is the intersection of a row and a column i.e. a cell is identified by
column and row.
Each cell has a name, or a cell address based on which column and row it intersects. The
cell address of a selected cell appears in the name box.
5.8 Spreadsheets
To Select a Cell:
Click a cell to select it. When a cell is selected, you will notice that the borders of the
cell appear bold and the column heading and row heading of the cell are
highlighted.
Release your mouse. The cell will stay selected until you click another cell in the
worksheet.
To Select Multiple Cells:
Click and drag your mouse until all of the adjoining cells you want are highlighted.
Release your mouse. The cells will stay selected until you click another cell in the
worksheet.
Note: The active cell is the cell that receives the data or command you give it.
(like- 1, 2, 3, 4, 5, 6, 7….. so on) and each column is identified by column header (like- A, B,
C, D, E, F ….. so on).
Note: In Excel 2010, row numbers ranges from 1 to 1048576; in total 1048576 rows, and
columns ranges from A to XFD; in total 16384 columns.
By default, every row and column of a new workbook is set to the same height and
width. Excel allows you to modify column width and row height in different ways.
Drag the Adjustment tool left or right to the desired width and release the mouse
button.
Click OK. The width of each selected column will be changed in your worksheet.
Click OK. The selected rows heights will be changed in your spreadsheet.
5.12 Spreadsheets
In the Insert dialog box that appears, you can choose the type of insertion:
o Shift cells right: This option moves the existing cells to the right to make room
for the inserted cells.
o Shift cells down: This option moves the existing cells down to make room for
the inserted cells.
o Entire row: This option inserts an entire row above the selected cells.
o Entire column: This option inserts an entire column to the left of the selected
cells.
After selecting the desired insertion type, click the "OK" button. The cells will be
inserted, shifting the existing cells as per your selection.
In the Delete dialog box that appears, you can choose the type of deletion:
o Shift cells left: This option shifts the remaining cells to the left, filling the gap
created by the deleted cells.
o Shift cells up: This option shifts the remaining cells up, filling the gap created by
the deleted cells.
o Entire row: This option deletes the entire row containing the selected cells.
o Entire column: This option deletes the entire column containing the selected
cells.
After selecting the desired deletion type, click the "OK" button. The cells will be
deleted, and the remaining cells will be shifted accordingly.
The selected cells will be merged, and the text will be centered.
Enter text or numbers into the cell using your keyboard. The entered data appears in
the cell and in the formula bar.
Fil
e tab Save As
Select a folder where you would like to save the sheet, Enter file name which you
want to give to your sheet and Select a Save as type, by default it is .xlsx format.
Finally, click on Save button and your sheet will be saved with the entered name in
the selected folder.
But suppose that you want to start another new worksheet while you are working on
another worksheet, or you closed already opened worksheet and want to start a new
worksheet.
5.20 Spreadsheets
Now you will see the Insert dialog box with select Worksheet option as selected
from the General tab. Click Ok button.
A new blank sheet will be displayed and you can start typing your text.
Spreadsheets 5.21
Note: You can select the entire column and row, or specific cells.
(i) To select the entire column, just left-click the column heading and the entire
column will appear as selected.
(ii) To select the entire row, just left-click the row heading and the entire row will
appear as selected.
(iii) To select the specific cells, just left-click a cell and drag your mouse to select the
other cells. Then, release the mouse button.
Spreadsheets 5.23
Note: As you move over the font list, the Live Preview feature previews the font for you
in the spreadsheet.
To Change the Font Size:
Select the cell or cells you want to format.
Left-click the drop-down arrow next to the Font Size box on the Home tab.
Select a font size from the list.
OR
Select More Colors. A dialog box will appear.
Select a color.
Click OK.
To Add a Border:
OR
Select More Colors. A dialog box will appear.
Select a color.
Click OK.
OR
Right click on the sheet tab and select Rename option from the shortcut menu. The
text is highlighted by a black box.
Fig. 5.40 (Re nam ing a w ork s h e e tth rough Sh ortcutm e nu)
Fig. 5.42 (Ins e rta Ne w w ork s h e e t: Us ing Ins e rtW ork s h e e ttab)
Spreadsheets 5.27
Right click on the sheet tab and select Insert option from the shortcut menu.
Note: To change the order of the worksheets in a workbook, click the tab of the
worksheet that you want to move, and then drag it to the location that you want.
quarters, months, weeks, and days, then you type it once and it will appear on every
worksheet included in the grouping.
Fig. 5.45 (M ul
tipl
e w ork s h e e ts in a Group)
To Group Worksheets:
To select one worksheet, click the sheet tab.
To select more than one worksheet, hold the Control key down and click one or
more worksheet tabs in the workbook.
To select all worksheets in a workbook, right-click any worksheet tab and choose
Select All Sheets from the shortcut menu.
When you are finished entering, moving, copying, or formatting data, you will need to
ungroup worksheets. If you do not ungroup the sheets, any work you do in one sheet will
be duplicated in all of the others.
To Ungroup Worksheets:
Right-click any of the selected worksheet tabs.
Choose Ungroup Sheets from the shortcut menu.
Note: When multiple worksheets are selected, [Group] appears in the title bar at the top
of the worksheet. To cancel a selection of multiple worksheets in a workbook, click any
unselected worksheet. If no unselected sheet is visible, right-click the tab of a selected
sheet, and then click Ungroup Sheets on the shortcut menu.
On the Home tab, in the Cells group, click the arrow next to Delete, and then click
Delete Sheet.
5.30 Spreadsheets
You can also right-click the sheet tab of a worksheet or a sheet tab of any selected
worksheets that you want to delete, and then click Delete Sheet.
OR
You can also right-click a selected sheet tab, and then click Move or Copy.
Move or Copy dialog box will be appeared. In the Move or Copy dialog box, click
the sheet that should be after the moved or copied sheet.
5.32 Spreadsheets
To copy the sheets instead of moving those, in the Move or Copy dialog box, select
the Create a copy check box.
When you create a copy of the worksheet, the worksheet is duplicated in the
workbook, and the sheet name indicates that it is a copy. For example, the first copy
that you make of Sheet1 is named Sheet1 (2).
5.15 FORMULA
Formulas are equations that perform calculations on data values in the worksheet. Like a
calculator, Excel can execute formulas that add, subtract, multiply, and divide. A formula
can be a combination of constant values, cell references and mathematical operators (+, -, /, *, =).
Spreadsheets 5.33
A formula starts with an equal sign (=) in a cell. This tells Excel that you are entering
a formula, not just numbers.
Type the equation you want to calculate. For example, to add up 10 and 20, you type
=10+20.
Press the Enter key to complete your calculation.
Instead of entering numbers directly in your calculation formula, you can put them
in separate cells, and then reference those cells in your formula, e.g., =A1+A2+A3.
Example:
The following formula multiplies 5 by 10 and then adds the value in cell A2 to the result:
=A2+5*10
Here,
5 and 10 are constant values.
+ and * are mathematical operators.
A2 is the cell reference, which returns the value in cell A2.
The formula is visible only in the Formula bar. A formula's result will change as different
numbers are entered into the cells included in the formula's definition.
Note: The cell address in a formula is known as the cell reference.
^ (Exponential Operator) Raises the power of the first numeric value by the = A1 ^ B1
second numeric value.
= (Equals To) It compares two values and returns TRUE if both =A1 = B1
values are equal; else returns FALSE.
<> (Not Equals To) It compares two values and returns TRUE if both =A1 <> B1
values are not equal to each other else returns
FALSE.
> (Greater Than) It returns TRUE if the value in cell A1 (First Value) =A1 > B1
is greater than the value in cell B1 (Second Value)
else returns FALSE.
< (Less Than) It returns TRUE if the value in cell A1 (First Value) =A1 < B1
is lesser than the value in cell B1 (Second Value);
else returns FALSE.
>= (Greater than or equals It returns TRUE if the value in cell A1 (First Value) =A1 >= B1
to) is greater than or equals to the value in cell B1
(Second Value); else returns FALSE.
<= (Less than or equals to) It returns TRUE if the value in cell A1 (First Value) =A1 <= B1
is less than or equals to the value in cell B1 (Second
Value); else returns FALSE.
Spreadsheets 5.35
, (Comma) It is a union operator. This operator combines (as the = SUM(A2:A6, A2:B3)
word union suggests) two or more than two
references into a single reference.
To copy the formula, click on the Home tab Clipboard group Copy command.
OR
Press Ctrl+C.
Now, select the cell where the copied formula is to be pasted.
To paste the formula, click on the Home tab Clipboard group Paste command.
OR
Press Ctrl+V.
OR
Press the Enter key. The formula is copied to the new location.
Note: The cell references in a formula are automatically updated when the formula is
copied to another cell in the worksheet.
Make the necessary changes to the formula. Like, replace cell A2 with cell A3 in the
formula.
Spreadsheets 5.37
(2) Absolute Reference: Absolute reference is used when you do not want to change the
address of the cell on copying the formula to another cell. For this purpose, you have to add
the dollar symbol ($) before the column and the row number.
Example:
Enter the numbers (Figure 5.61) you want to calculate (e.g., 34,567.00 in cell B2 and
1,234.00 in cell B3).
Then, create a simple formula (=B2+B3) in cell B5.
To create an absolute reference in the formula just created, insert a $ symbol before
the B (column reference) and 2 (row reference) in the reference to B2 so the new
formula reads, (=$B$2+B3). (Fig. 5.62)
Copy and Paste the formula to another adjacent cell (D5). The formula now includes
an absolute reference to B2, (=$B$2+D3).
Spreadsheets 5.39
(3) Mixed Reference: It is a combination of Relative and Absolute reference. In this type
of reference, either row or column has to remain fixed.
Example:
Enter the numbers you want to calculate.
(e.g., 10 in cell A1 and 20 in cell A2). (Fig. 5.64)
Then, create a simple formula (=A1+A2) in cell A3.
To create a mixed reference in the formula just created, insert a $ symbol before the
A (column reference) for A1 and a $ symbol before the 2 (row reference) for A2 in
the formula bar. The new formula reads, (=$A1+A$2). (Fig. 5.65)
Copy and Paste the formula to another adjacent cell (B3). The formula now includes
a mixed reference for the cell B3 (=$A1+B$2).
5.40 Spreadsheets
5.17 FUNCTIONS
Functions are predefined formulas that perform calculations by using specific values,
called arguments, in a particular order. Functions can be used to perform simple or complex
calculations. Functions save you the time of writing lengthy formulas.
For example, you can use an Excel function called Average, to quickly find the average of
range of numbers.
Each function has a specific order, called syntax, which must be strictly followed for the
function to work correctly.
Syntax Order:
1. All functions begin with the = sign.
2. After the = sign, define the function name (e.g., SUM).
3. After the function name, define argument(s) enclosed by parentheses (numbers, text
or cell references). If there is more than one argument, separate each by a comma.
An example of a function with one argument that adds a range of cells, B3 through B10:
An example of a function with more than one argument that calculates the average of
numbers in a range of cells, B3 through B10, and C3 through C10:
Excel provides hundreds of functions to assist you in different sort of calculation. Some
of the commonly used functions are discussed below:
(1) SUM
The SUM function returns the sum of values supplied. These values can be numbers, cell
references, ranges, and constants, in any combination.
Example:
In the following spreadsheet, the SUM function is used to calculate the sum of the
numbers 5, 6, 7, 8 & 9. In each of the five methods, the numbers are supplied to the SUM
function in a different way.
(2) SUMIF
The SUMIF function returns the sum of cells that meet a single condition. Criteria can be
applied to dates, numbers, and text.
Example:
The following spreadsheet shows three examples of the SUMIF function used with text-
based criteria:
5.42 Spreadsheets
(3) PRODUCT
The PRODUCT function returns the product of a supplied set of numerical values.
Example:
In the following spreadsheet, the PRODUCT function is used to calculate the product of
the numbers 3, 6, 2, 8 & 5. In each of the five methods, the numbers are supplied to the
PRODUCT function in a different way.
(4) SUMPRODUCT
The SUMPRODUCT function returns the sum of the products of the corresponding
values in a set of supplied arrays.
Spreadsheets 5.43
Example:
The following spreadsheet shows the use of SUMPRODUCT function:
(5) POWER
The POWER function calculates a given number, raised to a supplied power.
Example:
The following spreadsheet shows the use of POWER function:
(6) SQRT
The SQRT function calculates the positive square root of a supplied number. If the
supplied number is negative, the SQRT function returns the #NUM! Error.
Example:
The following spreadsheet shows the use of SQRT function:
5.44 Spreadsheets
(7) SUBTOTAL
The SUBTOTAL function performs a specified calculation (Eg. the sum, product,
average, etc.) for a supplied set of values.
Syntax of the function is:
SUBTOTAL( function_num, ref1, [ref2], ... )
Here,
function_num - An integer that denotes the calculation type (e.g. sum, average, etc.).
ref1, [ref2], ... - One or more references to cells containing the values that the calculation
is to be performed on. Blank cells and cells containing non-numeric values
are ignored in the calculation.
The following table (Table 5.1) shows the possible values for function_num:
Table 5.1
function_num function_num
Function
(include hidden values) (ignore hidden values)
1 101 AVERAGE
2 102 COUNT
3 103 COUNTA
4 104 MAX
5 105 MIN
6 106 PRODUCT
7 107 STDEV
8 108 STDEVP
9 109 SUM
10 110 VAR
11 111 VARP
Example:
The following spreadsheet shows the use of SUBTOTAL function:
Spreadsheets 5.45
In the example above, as all cells are visible, we could have set the function_num
argument to be either 9 or 109 for the SUM, and to be either 1 or 101 for the AVERAGE
calculation (Refer Table 5.1). Both options would give the same results.
(8) MOD
The MOD function returns the remainder of a division between two supplied numbers.
Example:
The following spreadsheet shows the use of MOD function:
(9) ROUND
The ROUND function rounds a supplied number up or down, to a specified number of
decimal places.
Example:
The following spreadsheet shows the use of ROUND function:
(10) LOG10
The LOG10 function calculates the base-10 logarithm of a number. The base-10
logarithm of a number is the power to which 10 must be raised to obtain that number. For
example, the base-10 logarithm of 100 is 2, because 10 raised to the power of 2 is 100.
Example:
The following spreadsheet shows the use of LOG10 function:
5.46 Spreadsheets
(11) ABS
The ABS function returns the absolute value of a number. In other words, it is the
positive version of the number, regardless of whether the number is positive or negative.
Example:
The following spreadsheet shows the use of ABS function:
(12) LN
The LN function calculates the natural logarithm of a number. The natural logarithm
uses the mathematical constant e (approximately 2.71828) as the base. In simpler terms, it
tells you to which power e must be raised to get a certain number.
Example:
The following spreadsheet shows the use of LN function:
(1) AVERAGE
The AVERAGE function is used to calculate the average or the arithmetic mean of a list
of supplied numbers.
Spreadsheets 5.47
Example:
In the following spreadsheet, the AVERAGE function is used to calculate the arithmetic
mean of the numbers 8, 7, 9, 6 & 10. In each case, the values are supplied to the function in
different ways.
(2) MIN
The MIN function returns the smallest value from a supplied set of numeric values.
Example:
The following spreadsheet shows the use of MIN function:
(3) MAX
The MAX function returns the largest value from a supplied set of numeric values.
Example:
The following spreadsheet shows the use of MAX function:
5.48 Spreadsheets
(4) COUNT
The COUNT function returns the count of numeric values in a supplied set of cells or
values. This count includes both numbers and dates.
Example:
The following spreadsheet shows the use of COUNT function:
(5) COUNTIF
The COUNTIF function returns the number of cells within a supplied range, that satisfy
a given criteria or condition.
Example:
Based on the above spreadsheet, the following COUNTIF functions will return the
different results:
Spreadsheets 5.49
(6) MEDIAN
The MEDIAN function in Excel is a statistical function that calculates the middle value
of a set of numbers. When the data set has an odd number of values, the median is the
middle value. When the data set has an even number of values, the median is the average of
the two middle values.
Example:
(7) MODE
The MODE function in Excel is a statistical function that calculates the most frequently
occurring value in a data set. It returns the value or values that appear the most often within
a range of cells. The MODE function is useful for identifying patterns and trends in data.
Example:
5.50 Spreadsheets
(8) STDDEV
The STDEV function in Excel calculates the standard deviation of a sample of data. The
standard deviation is a measure of how spread out the data is from the average value. A low
standard deviation indicates that the data is clustered closely around the mean, while a high
standard deviation indicates that the data is spread out over a wider range of values.
Example:
(9) VAR
The VAR function in Excel calculates the variance of a sample of data. Variance is a
statistical measure that indicates how much a set of numbers varies from its mean (average).
A higher variance indicates that the numbers are more spread out, while a lower variance
indicates that the numbers are more tightly clustered around the mean.
Example:
Suppose you have a set of exam scores: 80, 75, 90, 85, and 95. To calculate the variance of
these scores, you would use the following formula:
=VAR(80, 75, 90, 85, 95)
This formula would return a value of 62.5, which is the variance of the exam scores.
(10) SKEW
The SKEW function calculates the skewness of a dataset, indicating whether the data is
skewed to the left (negative skewness), to the right (positive skewness), or is symmetrical
(zero skewness).
Spreadsheets 5.51
Example:
Let's consider a simple dataset: 5, 8, 8, 10, 12. To calculate the skewness of the dataset,
you would use the following formula:
=SKEW(5, 8, 8, 10, 12)
This formula would return a value of -0.1184, indicating negative skewness.
(11) KURT
The KURT function calculates the kurtosis of a dataset, which is a measure of the
sharpness of a distribution's peak. It helps you understand whether the data is more or less
peaked than a normal distribution.
Example:
Suppose you have a dataset of exam scores: 75, 80, 85, 90, and 95. To calculate the
kurtosis of these scores, you would use the KURT function in Excel like this:
=KURT(75, 80, 85, 90, 95)
This formula would return a value of -1.2.
(12) CORREL
The CORREL function measures how much two sets of numbers are related to each
other. It gives you a number between -1 and 1, where:
1: Perfect positive correlation (as one set of numbers increases, the other set also
increases).
0: No correlation (there's no apparent relationship between the sets of numbers).
-1: Perfect negative correlation (as one set of numbers increases, the other set
decreases).
Example:
5.52 Spreadsheets
Here, the IF function returns PASS in cell C1 because the value in cell A1 is equals to 33.
(2) AND
The AND function returns TRUE if all conditions are true and returns FALSE if any of
the conditions are false.
Example:
In the following spreadsheet, select cell C1, enter the function =IF(AND(A1>=60,B1<100),
"FIRST","SECOND") and Press Enter.
Here, the AND function returns FALSE because the value in cell A1 is not greater than
or equals to 60, though the value in cell B1 is less than 100. So in this function, the second
condition is true, but the first condition is false. As a result, this function returns FALSE and
put SECOND in cell C1.
(3) OR
The OR function returns TRUE if any of the conditions are TRUE and returns FALSE if
all conditions are false.
Example:
In the following spreadsheet, select cell C1, enter the function =IF(OR(A1>=60,B1<100),
"FIRST","SECOND") and Press Enter.
Spreadsheets 5.53
Here, the OR function returns TRUE because the value in cell B1 is less than 100, though
the value in cell A1 is not greater than or equals to 60. So in this function, out of two
conditions, one is true. As a result, this function returns TRUE and put FIRST in cell C1.
(4) NOT
The NOT function returns the opposite to a supplied logical value. That is, if the
supplied value is TRUE, the NOT function returns FALSE and if the supplied value is
FALSE, the NOT function returns TRUE.
Example:
The following spreadsheet shows the use of NOT function:
(1) DATE
The DATE function converts a supplied year, month and day into an Excel date.
Example:
5.54 Spreadsheets
(2) TIME
The TIME function accepts three integer arguments representing hours, minutes and
seconds, and returns an Excel time i.e. it returns the decimal value that represents the time
in Excel.
Example:
(3) NOW
The NOW function returns the current date and time. This function receives no
arguments. The NOW function updates every time your Excel worksheet is refreshed, and
so any cell(s) containing this function will be continually changing.
Example:
(4) TODAY
The TODAY function returns the current date. The function has no arguments.
Example:
(5) DAY
The DAY function returns an integer representing the day of the month (from 1 - 31) of a
supplied date.
Example:
Spreadsheets 5.55
(6) MONTH
The MONTH function returns an integer, representing the month (from 1 - 12) of a
supplied date.
Example:
(7) YEAR
The YEAR function returns an integer representing the year of a supplied date.
Example:
(8) HOUR
The HOUR function returns an integer representing the hour component of a supplied
time.
Example:
5.56 Spreadsheets
(9) MINUTE
The MINUTE function returns an integer representing the minute component of a
supplied time.
Example:
(10) SECOND
The SECOND function returns an integer representing the second component of a
supplied time.
Example:
(1) LEFT
The LEFT function is used to extract the leftmost characters from a string. It returns a
specified number of characters from the start of a supplied text string.
Example:
The following spreadsheet shows the use of LEFT function:
Spreadsheets 5.57
(2) RIGHT
The RIGHT function is used to extract the rightmost characters from a string. It returns a
specified number of characters from the end of a supplied text string.
Example:
The following spreadsheet shows the use of RIGHT function:
(3) MID
The MID function is used to extract a substring, starting in the middle of a string. It
returns a specified number of characters from the middle of a supplied text string.
Example:
The following spreadsheet shows the use of MID function:
(4) LEN
The LEN function is used to get the length of a string. It returns the length of a supplied
text string.
Example:
The following spreadsheet shows the use of LEN function:
5.58 Spreadsheets
(5) FIND
The FIND function is used to find the position of a substring in a string. It returns the
position of a specified character or sub-string within a supplied text string.
Example:
The following spreadsheet shows the use of FIND function:
(6) LOWER
The LOWER function converts all characters in a supplied text string to lower case.
Example:
The following spreadsheet shows the use of LOWER function:
(7) UPPER
The UPPER function converts all characters in a supplied text string to upper case.
Spreadsheets 5.59
Example:
The following spreadsheet shows the use of UPPER function:
(8) TRIM
The TRIM function removes extra spaces (i.e. all spaces except for single spaces between
words or characters) from a supplied text string.
Example:
The following spreadsheet shows the TRIM function applied to four different text
strings:
In all four of the above cases, the result is the string "trimmed text".
- with no spaces at the start or end and just one space in the middle.
Example:
=ISERROR(10/0)
This formula attempts to divide 10 by 0. Since division by 0 is an invalid operation, the
formula will evaluate to an error. The ISERROR function will return TRUE in this case,
indicating that an error occurred.
(2) NA Function: The NA function in Excel is used to represent a missing or unavailable
value in a spreadsheet. It is an error value that is used to indicate that a cell does not contain
any data.
To use the NA function, simply type =NA() into a cell. The cell will then display the
error value #N/A.
Syntax:
NA()
Example:
Let's say you have a spreadsheet that tracks sales figures for each month of the year. For
the month of January, you do not have any sales data. You can use the NA function to
indicate that the sales data for January is missing:
By using the NA function, you can avoid errors in your formulas. For example, if you
calculate the average sales for the year, the formula =AVERAGE(B2:B6) will not include the
missing sales data for January.
(3) IFERROR Function: The IFERROR function is a versatile error-handling function in
Excel that allows you to specify an alternative value to return if a formula evaluates to an
error. This function is crucial for preventing errors from causing unexpected results or
crashes in your spreadsheets.
Syntax:
IFERROR(value, value_if_error)
Spreadsheets 5.61
Here,
value: The formula or expression to evaluate.
value_if_error: The value to return if the formula evaluates to an error. This value
can be a text message, a numeric value, another formula, or even an empty cell.
Example:
Let's say you have a formula =AVERAGE(A2:A10) that calculates the average of a range
of cells, but one of the cells in the range contains invalid data.
To prevent the formula from displaying an error message and instead return a more
informative message, you can use the IFERROR function as follows:
=IFERROR(AVERAGE(A2:A10), "Invalid data found")
In this example, if the AVERAGE formula evaluates to an error due to invalid data, the
IFERROR function will return the text message "Invalid data found" instead of displaying
an error message.
(1) HLOOKUP
The HLOOKUP function looks up a supplied value in the first row of a table, and
returns the corresponding value from another row.
Syntax:
HLOOKUP(lookup_value, table_array, row_index_num, [range_lookup])
Here,
lookup_value: The value that you want to search for, in the first row of the supplied
data array (table).
table_array: The data array or table, containing the data to be searched in the top
row, and the return values in any other row.
row_index_num: The row number, within the supplied table_array, that you want
the corresponding value to be returned from.
[range_lookup]: An optional logical argument, which can be set to TRUE or FALSE,
means:
5.62 Spreadsheets
(i) TRUE- if the function cannot find an exact match to the supplied lookup_value,
it should use the closest match below the supplied value.
(ii) FALSE- if the function cannot find an exact match to the supplied lookup_value,
it should return an error.
Example:
In the above example, the HLOOKUP function searches through the top row of the
table_array (the range A2-F2), to find a match for the lookup_value (the name "Ed"). When
the name "Ed" is found, the function returns the corresponding value from the 5th row of
the table_array.
(2) VLOOKUP
The VOOKUP function looks up a supplied value in the first column of a table, and
returns the corresponding value from another column.
Syntax:
VLOOKUP(lookup_value, table_array, col_index_num, [range_lookup])
Here-
lookup_value: The value that you want to look up.
table_array: The data array or table, containing the search values in the left hand
columns and the return values in another column.
Spreadsheets 5.63
col_index_num: The column number, within the supplied table_array, that you want
to return a value from.
[range_lookup]: An optional logical argument that describes what the function
should return in the event that it does not find an exact match to the lookup_value.
The [range_lookup] can be set to TRUE or FALSE, means:
(i) TRUE- If the function cannot find an exact match to the supplied lookup_value;
it should use the closest match below the supplied value.
(ii) FALSE- If the function cannot find an exact match to the supplied lookup_value,
it should return an error.
Example:
The above VLOOKUP function returns the price for "Cornflakes", which is $3.50.
In this example:
The lookup_value is the text string "Cornflakes", which is located in cell D2;
The table_array is columns A-B of the spreadsheet;
The col_index_num is set to 2, to denote that the value returned should be taken
from column 2 of the table_array;
The [range_lookup] argument is set to FALSE, to indicate that we only want a result to
be returned if an exact match to the lookup_value is found.
calculations, and modeling. Here are some important financial functions in Excel with
suitable examples:
(4) RATE
The RATE function calculates the interest rate per period for an investment or loan
based on regular periodic payments.
Example: Let's say you are considering a loan with a monthly payment of ` 10,174 for a
Spreadsheets 5.65
period of 5 years and a present value of ` 5,00,000. You can use the RATE function to
calculate the interest rate. The formula would be:
=RATE(5*12, -10174, 500000)
This formula would return the interest rate per month, which is 0.68%. To calculate the
annual interest rate, you would multiply the monthly interest rate by 12. Then, the formula
would be:
=RATE(5*12, -10174, 500000) * 12
The final result would be 8.15%.
(5) NPER
The NPER function is used to calculate the number of periods required to pay off a loan
or investment based on fixed, periodic payments and a constant interest rate. It stands for
"Number of Periods."
Example: Suppose you take out a loan of $10,000 at an annual interest rate of 5%, and
you plan to make monthly payments of $200. You want to know how many months it will
take to pay off the loan.
The formula would be:
=NPER(5%/12, -200, 10000)
Here,
rate: 5% annual interest rate, so 5%/12 for monthly rate.
payment: Monthly payment is -200 (negative because it's an outgoing payment).
present_value: Loan amount is 10,000.
The result would be 56.1843 number of periods (months) required to pay off the loan.
(6) NPV
The NPV function is used to calculate the net present value of an investment based on a
series of future cash flows, discounted at a specified rate. NPV stands for Net Present Value.
Example: Suppose you are considering an investment that costs $1,000 today (Year 0),
and it generates cash flows of $500 at the end of Year 1 and $700 at the end of Year 2. You
want to calculate the NPV of this investment with a discount rate of 5%.
The formula would be:
=NPV(5%, -1000, 500, 700)
5.66 Spreadsheets
Here,
Rate (Discount Rate): 5%
Cash Flows:
Year 0: -$1,000 (initial investment, negative because it's an outflow)
Year 1: $500 (inflow)
Year 2: $700 (inflow)
The NPV (Net Present Value) would be $105.82.
Example:
(i) Create a new worksheet and enter the database list, as shown below:
Example:
(i) Create a new worksheet and enter the database list, as shown below:
Example:
(i) Create a new worksheet and enter the database list, as shown below:
The sum of the numbers will be added to cell B7, or the cell immediately beneath the
defined range of numbers.
5.76 Spreadsheets
Hold your mouse pointer over the fill handle, it will change to a plus sign (+).
Click on the + sign and drag the mouse in any direction (Down, Up, Right or Left).
Spreadsheets 5.77
OR
Hold down the Shift key and click in the last cell you want to fill. Thereafter, click on
Home tab Editing group Fill command. A drop-down list will be appeared.
Select the direction (say- down) in which you want to copy.
Note: If the cell contains a number, the number will fill in series. If the cell contains text,
the same text will fill in the direction you choose.
Click on Home tab Editing group Fill command. A drop-down list will be
appeared. Select the Series option from the list.
The selected cells then fill in the other items on the list sequentially, repeating from
the top of the list when they reach the end of the list.
In Home tab, under Styles group, click Conditional Formatting command. A drop
down list will be displayed. Click Highlight Cells Rules Greater Than.
Enter value 70 in the GREATER THAN field and select “Light Red Fill” option
from the “with: drop down list”.
Click OK.
The final result of conditional formatting would be look like:
Select Print Active Sheets from the print range drop-down menu.
You can see what your selection will look like on the page in Print Preview.
Click the Print button.
To Print only Selected Cell Ranges:
Hold down the Ctrl key to select the non-contiguous ranges or cells.
Click Page Layout tab Page Setup group Print Area command. From the drop
down list, select Set Print Area.
The selected ranges will be surrounded by a dotted line. Click File Print to start
printing the ranges one by one.
Note: This Set Print Area command only allows you to select and print cell ranges in the
active worksheet. If you switch to another worksheet, the previous set print areas will be
cleared.
Click the Page Layout tab Page Setup group Breaks command Remove
Page Break option.
The page break (represented by a dashed line) is removed from the page.
Source Data
This is the range of cells that make up a chart. The chart is updated automatically
whenever the information in these cells changes.
Title
This is the title of the chart.
Legend
This is the chart key, which describes what each color on the chart represents.
Axis
This is the vertical and horizontal parts of a chart. The vertical axis is often referred
to as the Y axis, while the horizontal axis is referred to as the X axis.
Data Series
This is the actual charted values, which usually are rows or columns of the source
data.
Value Axis
This is the axis that represents the values or units of the source data.
Category Axis
This is the axis identifying each data series.
5.88 Spreadsheets
AREA CHART
Area chart emphasizes the trend of each value over time. An area chart also shows
the relationship of parts to a whole.
COLUMN CHART
Column chart uses vertical bars or columns to represent data. They can work with
many different types of data, but they are most frequently used for comparing
information.
BAR CHART
Bar chart is similar to a column chart except these use horizontal instead of vertical
bars. Like the column chart, the bar chart shows variations in value over time.
Spreadsheets 5.89
LINE CHART
Line chart shows trends and variations in data over time. A line chart displays a
series of points, called data points that are connected over time. The data points are
connected with lines, making it easy to see whether values are increasing or
decreasing over time.
PIE CHART
Pie chart displays the contribution of each value to the total. Pie charts are a very
effective way to display information when you want to represent different parts of
the whole, or the percentages of a total. In Pie chart, each value is shown as a slice of
the pie, so it is easy to see which values make up the percentage of a whole.
Click the Insert tab. In the Charts group, select the desired Chart Category (say-
Column).
Select the desired Chart type from the drop-down menu (say- Clustered Column).
90
80
70
60
50
40
30 M ark s Math
20 M ark s Engl
is h
0
Rick y Vik as M oh it Pranav
5.23 SORTING
A spreadsheet can contain a huge amount of information. With more rows and columns
than previous versions, Excel 2010 gives you the ability to analyze and work with an
enormous amount of data. To most effectively use this data, you may need to manipulate
this data in different ways. Sometimes you may find that you need to reorder or sort that
information to be able to use it most effectively.
Sorting or Data Sorting is a common spreadsheet task that allows you to easily reorder
your data. The most common type of sorting is alphabetical ordering, which you can do in
ascending or descending order.
Click the Sort & Filter command in the Editing group on the Home tab. Select Sort
A to Z.
Note: You can sort in reverse alphabetical order by choosing Sort Z to A in the list.
5.94 Spreadsheets
Click the Sort & Filter command in the Editing group on the Home tab. Select Sort
Smallest to Largest.
Now, the data in the spreadsheet will be organized numerically from the smallest to
largest value.
Note: You can sort in reverse numerical order by choosing Sort Largest to Smallest in
the list.
Spreadsheets 5.95
Click the Sort & Filter command in the Editing group on the Home tab. Select Sort
Oldest to Newest.
Note: You can sort in reverse Date or Time order by choosing Sort Newest to Oldest in the
list.
5.96 Spreadsheets
5.24 FILTERING
Filtering is a convenient and reliable way to locate and manage spreadsheet data. This
allows you to focus on specific spreadsheet entries. Filtered data can be copied,
manipulated, and printed without having to move it to a new spreadsheet.
Data filtering in Excel enables the user to work with a subset of data within the data list.
When a filter is created, only the records that contain the values specified are displayed.
Other records in the data list are hidden temporarily.
Unlike sorting, filtering does not rearrange a list. Filtering temporarily hides rows you
do not want displayed.
Filtering in Excel:
In Excel 2010, filtering, or temporarily hiding data in a spreadsheet is very easy. You can
filter data using the AutoFilter feature in Excel 2010 to display only the data that meets
specified criteria.
To Filter Data:
Open the spreadsheet in which you want to filter data.
Prepare your data for an Excel 2010 AutoFilter: Excel can filter the data in all selected
cells within a range, as long as there are no completely blank rows or columns within
the selected range. Once a blank row or column is encountered, filtering stops. If the
data in the range you wish to filter is separated by blank rows or columns, remove
them before proceeding with the AutoFilter.
Conversely, if there is data on the worksheet that you do not want to be part of the
filtered data, separate that data using one or more blank rows or blank columns. If
Spreadsheets 5.97
the data you don't want to filter is located beneath the data to be filtered, use at least
one completely blank row to end filtering. If the data you don't want to filter is
located to the right of data to be filtered, use a completely blank column.
Select any cell within the range that you would like to filter.
Select Filter command in Sort & Filter group under Data tab.
Drop-down arrows will appear at the top of each column range. If the range of cells
contains column headings, the drop-down arrows will appear in the headings.
Click the drop-down arrow of the column containing the desired criteria to be
filtered. Do the following tasks:
(a) To filter the data by criteria, click to clear the “(Select All)” check box. All
other check boxes will be cleared. Click to select the check boxes of the criteria
that you want to appear in the filtered list.
(b) Click "OK" to filter the range by the selected criteria. The filtered result will be
look like this:
Select the worksheet: Click on the worksheet tab to select the specific worksheet you
want to protect. If you want to protect multiple worksheets, hold down the Ctrl key
while selecting multiple tabs.
In the Excel ribbon at the top of the window, click on the "Review" tab.
In the "Changes" group, click on the "Protect Sheet" button.
In the "Protect Sheet" dialog box, you can choose various protection options, such as
allowing or disallowing certain actions like- selecting cells, formatting cells, inserting or
deleting rows/columns, etc. You can also set a password to prevent others from
unprotecting the sheet without the password.
After configuring the desired protection options, click the "OK" button. The selected
worksheet(s) will be protected.
5.100 Spreadsheets
To Freeze Row(s):
Select the row right below the row or rows you want to freeze. For example, if you
want row 1 to always appear at the top of the worksheet even as you scroll, then
select row 2.
Click the View tab Windows group Freeze Panes command. A drop-down
menu appears. Select Freeze Panes.
A black line appears below the row that is frozen in place. Scroll down in the
worksheet to see the rows below the frozen rows.
To Freeze Column(s):
Select the column to the right of the columns you want frozen. For example, if you
want column A to always appear to the left of the worksheet even as you scroll, select
column B.
Spreadsheets 5.103
Click the View tab Windows group Freeze Panes command. A drop-down
menu appears. Select Freeze Panes.
A black line appears to the right of the frozen area. Scroll across the worksheet to see
the columns to the right of the frozen columns.
To Unfreeze Panes:
Click the View tab Windows group Freeze Panes command. A drop-down
menu appears. Select Unfreeze Panes.
Note: Splitting the screen is an alternative to freeze panes to keep worksheet titles or
headings on screen as you scroll.
The mouse pointer will change to a double - headed black arrow when you are over
the split box. (Fig. 5.126)
When the mouse pointer changes, click and hold down the left mouse button.
A dark horizontal line will appear above row one of the worksheets.
Drag the mouse pointer downward. The dark horizontal line will follow the mouse
pointer. (Fig. 5.127)
Release the mouse button and the screen will be split into two views, each with its
own vertical scroll bar.
Now, above and below the horizontal split bar, there will be two copies of the
worksheet. (Fig. 5.128)
When the mouse pointer changes, click and hold down the left mouse button.
Spreadsheets 5.107
A dark vertical line will appear, running up the page. Drag the mouse to the left and
this line will follow. (Fig. 5.130)
Release the mouse button and the screen will be split into two views, each with its
own horizontal scroll bar.
Now, before and after the vertical split bar, there will be two copies of the
worksheet. (Fig. 5.131)
Note: To restore a window that has been split into two scrollable areas, double-click any
part of the split bar that divides the panes.
5.108 Spreadsheets
Naming Cells:
To name a cell in Excel, follow these steps:
1. Select the cell you want to name.
2. Click on the Name box located to the left of the formula bar.
3. Enter a descriptive name for the cell.
4. Press Enter to save the name.
Naming Cell Ranges:
To name a range of cells in Excel, follow these steps:
1. Select the range of cells you want to name.
2. Click on the Name box located to the left of the formula bar.
3. Enter a descriptive name for the range.
4. Press Enter to save the name.
Using the mouse, keyboard or Name Box, more than one cell can be selected to create a
range, and commands executed by Excel will affect the entire range.
Ranges can be made up of adjacent or non-adjacent cells. Adjacent cells are all together.
There are no gaps in the range. Non-adjacent cell ranges consist of two or more separate
blocks of cells. These blocks can be separated by rows or columns. For non-adjacent ranges,
a block of cells can be of any size – from one to several hundred or even a thousand or more.
A range consisting of adjacent cells can be created by dragging with the mouse. A range
of adjacent cells as seen in the Fig. 5.133 would be B1:B9.
Th e Range for th e
SUM function is B1
to B9 .
Ranges consisting of non-adjacent cells can be created by using the mouse and keyboard.
5.110 Spreadsheets
Ranges are identified by the cell references or addresses of the cells in the upper left and
lower right corners of the range. These two references are separated by a colon (:) which
tells Excel to include all the cells between these start and end points.
Short Answer Questions
Q1. W h atis Spre ads h e e t
Or
De fine W ork s h e e t.
Ans : Spre ads h e e t or W ork s h e e t is a docum e nt th at s tore s data in a grid of h oriz ontalrow s and
ve rticalcol um ns . Row s are typical l
yl abe le d us ing num be rs (1, 2, 3, e tc.), w h il
e col
um ns are
labe l e d w ith le tte rs (A, B, C, e tc). Individualrow /col um n locations , s uch as C3 or B12, are
re fe rre d to as ce l ls.
Spreadsheets 5.111
(Active Ce l
l)
Us ing th e m ous e , k e yboard or Nam e Box, m ore th an one ce l lcan be s e l
e cte d to cre ate a
range , and com m ands e xe cute d by Exce lw il
laffe ctth e e ntire range .
Range s can be m ade up of adjace nt or non-adjace nt ce l
ls . Adjace nt ce l
ls are al
ltoge th e r.
5.112 Spreadsheets
Long Answer Questions
Q1. W h atis Spre ads h e e t?Expl
ain th e m ain fe ature s ofM S-Exce l
.
Or
W h atis Spre ads h e e t?Explain th e m ain fe ature s ofa s pre ads h e e tpack age .
Ans : Re fe r s e ction 5.1 & 5.1.1
Q2. W h at is Spre ads h e e t?Expl ain diffe re nt k inds of m ath e m aticaland s tatis ticalfunctions
w ith e xam pl e.
Ans : Re fe r Se ction 5.1, 5.17.1 & 5.17.2
Q3. W h atare diffe re ntcate gorie s ofCh arts ?W rite th e s te ps to cre ate a ch artin M S-Exce l
.
Ans : Re fe r s e ction 5.22.1.2 & 5.22.1.3.1
Q4. De fine Ce l lRe fe re ncing. Expl ain re l
ative , m ixe d and abs ol ute ce l
lre fe re ncing w ith
e xam pl e.
Ans : Re fe r Se ction 5.16
Q5. H ow functions m ak e tas k s e as y in Exce l ?Expl ain diffe re nt k inds of m ath e m aticaland
s tatis ticalfunctions w ith e xam pl e.
Ans : Re fe r Se ction 5.17, 5.17.1 & 5.17.2
Q6. Dis cus s th e m ath e m aticalform ul
ae of SUM , SUBTO TAL, PRO DUCT, and AVERAGE in
a s pre ads h e e tin de tail
.
Ans : Re fe r Se ction 5.17.1