Simple Sumif giving wrong results

santidreamer

New Member
Joined
Apr 26, 2011
Messages
9
I am new to exce1 2011 formulas and cannot see why this formula is going wrong.

G53=SUMIF(B:B,"Yes",G2:G51)

The Yes in column B is generated by the formula below (which works)

=IF(AND(C23="",H23=""),"Yes","")

The value returned in G53 = 13,550,000

It should be 3,995,00+3,995,000+3,750,000+3,750,000 =15,490,000

15,490,000-13,550,000= 1,940,000 which is 1,940,000 (which is much less than any G2:G51 value.

Thank you in advance for helping
 

Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.
I have found the error

When B48=Yes G49 is added.

This is also true for the other 4 Yes results.

My understanding of this function is that when B48=Yes G48 is added.
 
Upvote 0
G53=SUMIF(B:B,"Yes",G2:G51) your issues will be caused by your arrays being different sizes, you have whole column B yet only G2:G51 for your sum range. Make both the same dimension and your issue will be resolved
 
Upvote 0
You have specified the whole column as the criteria range (B:B) but G2:G51 as the sum range. Doing that means that if the 1st cell in B:B is "Yes" then the first cell in G2:G51 is added to the sum, if B2 is "Yes" G3 is added etc.

In fact the sum range is automatically the same size as the criteria range so your formula can sum cells right down column G, e.g. G1000 will be added to the result if B999 is "Yes". Change to either

=SUMIF(B:B,"Yes",G:G)

or

=SUMIF(B2:B51,"Yes",G2:G51)
 
Upvote 0

Forum statistics

Threads
1,224,541
Messages
6,179,418
Members
452,912
Latest member
alicemil

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