SUM()

This article is also available in: Bahasa Malaysia Bahasa Indonesia


The SUM() function in Microsoft Excel is used to calculate totals of numeric values in a range that you select.

SUM(range)

range refers to one or more of the cells you select to sum or total up.

This can be a column of numbers, for example SUM(A1:A2) or across a row like SUM(A1:G1), or even individual cells that you select as in SUM(A1, C2, G3…).

For example, if you had a worksheet with monthly product sales, you can sum by the month columns and also by the product row for total sales.

Monthly product sales

To total sales for each month, select the cell below the month, then click on AutoSum icon on the Quick Access Toolbar.

sum function

Excel will automatically select the range of cells above.

You can also type the formula in if you prefer.

In the selected cell, type in =SUM(, then select the range of cells.

Press Enter to complete.

You can also total up by row.

In our sample, if you wanted a total of sales for January to June, then select the cell, either click on AutoSum in the Quick Access Toolbar, or type in =Sum(.

If you select AutoSum from the Quick Access Toolbar, Excel will select the range of cells across the row.

biannual sales total

If you want the total from different cells, after you type in =SUM(, select the cells separated by a comma as shown below.

sum values in different cells
=SUM(B2,B5,B8)

The cells need not be in the same column or row.

SUM() can also be used over a range of columns and rows.

sum range

Here, we have selected cells B2 through to D10 to total up the sales for the quarter from January to March.

Keep in mind that SUM() only works with numbers or numeric values.

If there is text in the selected range, Excel will ignore it and only total up any numbers that it finds.


Excel Functions

Excel Functions

Excel SUMIF() function

SUMIF()



This article is also available in: Bahasa Malaysia Bahasa Indonesia