Tuesday, October 06, 2009

Excel: sumif - using a SQL where clause in Excel

While doing testing today I needed to add all the values in column F by "Male" and "Female". I learned the amazing "sumif" function.
The syntax is

SumIf( range to filter by, criteria to filter, sum_range to be filtered)

In my case the first argument was a range in column B, my filter was "Male", and the range to actual sum was in column F.


Since I was summing based on multiple items like "Male", I told Excel to use the column to the left to be my filter value.


The criteria can be things like ">10".

No comments: