We help IT Professionals succeed at work.

# Excel SUM with matching condition

on
Medium Priority
200 Views
I need to get a sum of rows where the "Country" column is equal to "China".   How do I do this?   "Country" is column AE.
Comment
Watch Question

## View Solution Only

Most Valuable Expert 2012
Top Expert 2012
Commented:
Assume Country - Column AE, and the range to sum is AF:

You can use SUMIF

=SUMIF(AE:AE,"China",AF:AF) ' put this in the cell where you want the result

If you know the bounds of the data, you can include them, e.g., Assuming data starts on row 2:

=SUMIF(AE\$2:AE\$100,"China",AF\$2:AF\$100)

would give you the sum where data is in rows 2-100

The syntax is:

=SUMIF(range,criteria,[sum_range])

Dave
CERTIFIED EXPERT

Commented:
While Dave gave you the answer you're looking for, I'd like to probe a little more.  What version are you running?  How is your data structured?  You might be able to benefit from a PivotTable (probably THE best feature Excel has to offer - well, not including PowerPivot ;) ).  Just curious.

Regards,
Zack Barresse