Search Contextures Sites ![]()
Excel Sum Functions -- Sum Excel Cells
Note: Instead of typing the criterion in a formula, you can refer to a cell. For example, the formula in step 9 above could be changed to:
=SUMIF(A2:A10, B12, B2:B10)
if cell B12 contained the text pen.
Sum cells that match multiple criteria -- SUMIFS
Match multiple criteria
In Excel 2007 and later versions, you can use the SUMIFS function to calculate a total for rows that meet two or more criteria. In this example only the rows where the status is "Active" and the number of visits is greater than or equal to ten will be included in the total.
A step by step video is below the written instructions.
Video: SUMIFS Function
Sum cells that match multiple criteria -- SUMPRODUCT
Match multiple criteria
In Excel 2003 and earlier, you can use the SUMPRODUCT function to calculate a total for rows that meet two or more criteria. If you're using Excel 2007 or later, you should use the SUMIFS function, as described in the previous section.
In this example only the rows where the status is "Active" and the number of visits is greater than or equal to ten will be included in the total.
Version 2 -- Many Top Numbers
If many top numbers are to be summed you can include the INDIRECT function in the formula with the Excel SUM function. In the INDIRECT function, use row numbers that represent the numbers you want to include. In this example, rows 1:10 are used, so the top 10 numbers in the referenced range will be summed.
- Type the formula:
=SUM(LARGE(A1:A50,ROW(INDIRECT("1:10"))))- This is an array formula, and must be array-entered. To do this, hold the Ctrl and Shift keys, and press Enter
Version 3 -- Variable Top Numbers
If a variable number of top numbers are to be summed you can include the INDIRECT function in the formula with the Excel SUM function, as shown above, and refer to a cell that holds the variable..
Sum the Numbers in a Filtered ListAfter you filter the rows in a list, you can use the SUBTOTAL function, instead of the Excel SUM function, to sum the numbers in the visible rows.
- Apply an AutoFilter to the table. There are instructions here -- AutoFilter Basics
- Filter at least one of the columns in the table. In this example, the first column has been filtered for Binders.
- Select the cell immediately below the column you want to sum.
- Click the AutoSum button on the Ribbon's Home tab.
- If you want the SUBTOTAL function in a cell other than the one directly below the filtered list, you can type the formula, instead of using the AutoSum button.
- A SUBTOTAL formula will be automatically inserted, totalling the visible cells in the column
- The first argument in the SUBTOTAL function is a function number, that specifies how the numbers should be calculated. There is a 9 in this example, which tells Excel to SUM the numbers.
- Other function numbers can be used, such as 1 for AVERAGE, and 3 for COUNTA. Look in Excel's Help for a complete list.
- Press the Enter key to complete the formula entry.
Note: In Excel 2003 and later versions, you can use the formula:
=SUBTOTAL(109,B2:B9)
to subtotal visible cells in a range where rows have been manually hidden, or filtered.Excel Function Tutorials
Excel Sum Functions -- Sum Cells
Excel VLOOKUP Function
Excel INDEX / MATCH Functions
Excel Count Functions -- Count Cells
Excel INDIRECT FunctionExcel Video Tutorials for Functions:
Contextures Inc., Copyright ©2012
All rights reserved.
Last updated: January 28, 2012 5:59 PM