How to Add Numbers in Microsoft Excel if they Meet Certain Criteria
The SumIf function in Microsoft Excel is used to add numbers if they meet certain criteria. Excel's SumIf uses values in ranges of data. There needs to be a minimum of two ranges: at least one range to test criteria against and one range to sum. Excel takes the criteria from the formula and looks for matching information in the criteria range(s). If Excel finds a criteria match, it will add the number in the corresponding sum range. The SumIf formula is composed of three parts: the range of the data being tested, the criteria, which may be a cell or a value, and the sum range.
Instructions
-
-
1
Select "More Functions" from the "Sum" drop-down menu in the "Editing" section on the "Home" tab. This opens the "Insert Function" window.
-
2
Type "sumif" in the "Search For A Function" field and click the "Go" button. Verify that "SUMIF" is highlighted on the "Select a Function" pane and click the "OK" button. This opens the "Function Arguments" window.
-
-
3
Click in the "Range" field and enter the range of the data that needs to be tested; for example A1:A25 will test each cell starting with A1 and ending with A25 to see if it matches the criteria. The ":" represents "through."
-
4
Click in the "Criteria" field and either type the criteria or enter a cell value. The cell value should contain the criteria.
-
5
Click in the "Sum_Range" field and enter the range of cells that need to be added; for example, B1:B25 will sum any values that match the criteria. The results are displayed in the lower-left corner of the window next to "Formula result =." Click the "OK" button.
-
1
Tips & Warnings
The SumIf formula looks like "=SUMIF(Test Range, Criteria, Sum Range)," for example =SUMIF (A1:A25,C1,B1:B25) if the criteria is a cell value or =SUMIF (A1:A25,"text",B1:B25) if the criteria is text. Text criteria must be surrounded by double-quotes.
The SumIf formula can by typed directly into a cell instead of using the Insert Function window.