Excel Functions

You performed many Excel operations in the examples/exercises discussed above. Excel also has various inbuilt functions to perform different operations. A function can be specified in a cell with an equal sign followed by function name, opening and closing parentheses, and usually some arguments in between, typically a cell range or constant values.

The function SUM

Numbers were added in the above example using + sign but we can also use the function SUM. This is useful when you have to perform operations on a large number of cells (e.g. add the contents of all the cells from a column or a row). Let’s first see how to perform the same operation as done before, i.e. add the contents of cells D4 and D6:

• Select a cell (say D12);
• Type =SUM( and select the cell D4;
• Place a comma (,) and then select the cell D6. Your worksheet should look like the one shown in Fig. 4. Press Enter to obtain the result. Note that Excel will add a closing parenthesis, if you forget this).

Note that you can simply type =SUM(D4, D6) to obtain the same results. Also note that it is not essential to type SUM in the upper case;

Excel will change the case for you.

Figure 4. Adding numbers using the function SUM.

The same function SUM can be used to add all the numbers in a column or a row or from multiple cells. Multiple cells can be referred to using the same approach as discussed above but by placing a colon between them instead of a comma. For example, to add all the numbers from cell D3 to D7 type =SUM(D3:D7) in a cell where you want to store the results.

Alternatively, you could also use your mouse to select the cells:

• type = SUM( in a cell where you want to store the results.
• select the first cell you want to refer to (D3) and drag your mouse up to the last cell you want to refer to (D10).
• Place a closing parenthesis at the end and press Enter.

Note that you can use comma as well as a colon to refer to blocks of disjointed cells. For example, you can add cells C2 to C5 and cells D3 to D7 by typing:

= SUM(C2:C5,D3:D7)