The Excel SUMIF function returns the sum of cells that meet a single condition. Criteria can be applied to dates, numbers, and text.


Syntax

SUMIF(range, criteria, [sum_range])

Parameter Arguments:


range   Required. 

The range of cells that you want evaluated by criteria. Cells in each range must be numbers or names, arrays, or references that contain numbers. Blank and text values are ignored. The selected range may contain dates in standard Excel format (examples below).


criteria   Required. 

The criteria in the form of a number, expression, a cell reference, text, or a function that defines which cells will be added. Wildcard characters can be included - a question mark (?) to match any single character, an asterisk (*) to match any sequence of characters. If you want to find an actual question mark or asterisk, type a tilde (~) preceding the character.


For example, criteria can be expressed as 32, ">32", B5, "3?", "apple*", "*~?", or TODAY().


Important: Any text criteria or any criteria that includes logical or mathematical symbols must be enclosed in double quotation marks ("). If the criteria is numeric, double quotation marks are not required.


sum_range  Optional. 

The actual cells to add, if you want to add cells other than those specified in the range argument. If the sum_range argument is omitted, Excel adds the cells that are specified in the range argument (the same cells to which the criteria is applied).



Example:

Table below show that a column contains Amount(USD), you want to sum the corresponding values which Country is JAPAN. You can use the following formula: =SUMIF($C$2:$C$52,"AUSTRALIA",$D$2:$D$52)