Sumif

Hoosier03

Board Regular
Joined
Apr 29, 2011
Messages
121
I am using Excel 2007. Can someone tell me why the formula below does not work?


=IF(G$4="a",SUMIF('AOP Query'!$G$22:$G$440, $C30,'AOP Query'!$I$22:$L$440),0)


It is only adding one of the columns in the "AOP Query'!$I$22:$L$440" portion. I know this because I made a pivot table and the result that I am getting is exactly equal to one weeks worth of data and not 4.

Thanks
 

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.
Because SUMIF compares arrays of similar size/shape..
IE, if you did this

=SUMIF(A1:B10,10,D1:E10) it would work, because both arrays are the same size/shape.
It would sume column D where A = 10, + Column E where B = 10.

Try this instead..

=IF(G$4="a",SUMPRODUCT(('AOP Query'!$G$22:$G$440=$C30)*('AOP Query'!$I$22:$L$440)),0)
 
Upvote 0

Forum statistics

Threads
1,224,537
Messages
6,179,405
Members
452,911
Latest member
a_barila

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top