This article basically compares excel’s vlookup and sumif array functions and explains which one to use, when and why?

Vlookup and Sumif functions can only work when there is just one criterion.
When we want to sort out data using multiple criteria then we can use SUM(IF()) array formula.

Like if you have the quantity sold of 5 products in year 2001 to 2005. And you want to know how much was it for each product in year 2001,2002 and so on.
So there are two criteria:
First, which product??
Second, Which Year??

We can handle the above situation using SUM(IF()) array formula.

The following screen would give you a better picture of what I am trying to explain:

array-formula2.JPG
Now if you enter
={SUM(IF(($A$6:$A$19=E5)*($B$6:$B$19=$F$4),$C$6:$C$19))} in cell F5
you will notice it is picking the right amount for each product and year.

array-formula.JPG

Since it is an array formula, Press CTRL+SHIFT+ENTER instead of just ENTER.

Share This

Popularity: 46%