SUMIF CSE formula not working?

StuLux

Well-known Member
Joined
Sep 14, 2005
Messages
682
Office Version
  1. 365
Platform
  1. Windows
This CSE formula is not giving the expected results and I am tearing my hair out as to why? No matter what values I put in column F to match too Excel is only returning one value not the total e.g. if I have two entries with reference 2010-20 in column F with two values in column AZ (say 13 and 48) the forumal is only returning 48 not the expected 61. Any ideas? I've checked the formatting of the cells, made sure the references are definitely the same etc.

Code:
{=SUM(IF(Directory!$F$1:$F$500=$B2,Directory!$AZ$2:$AZ$500,0))}

Doh! Doh! Doh! - how stupid am I - just spotted that the arrays aren't the same dimensions!!!!!!!! Sorry for wasting anybody's time if you've looked at this!
 
Last edited:

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number
{=SUM(IF(Directory!$F$1:$F$500=$B2,Directory!$AZ$2:$AZ$500,0))}

Try making the ranges the same size.
 
Upvote 0
That formula, as written will give you an #N/A error because of the mismatched ranges so I presume they are the same size in reality.....

If that's just a typo on here then the error might be caused by some numbers in the sum range being text (and you can't check that by checking the cell formatting). Do you get the correct result with this version?

=SUM(IF(Directory!$F$2:$F$500=$B2,Directory!$AZ$2:$AZ$500+0))

or try converting the sum range to numeric. Select column AZ and use

data > text to columns > finish

Note: in most cases you'd just use SUMIF, i.e.

=SUMIF(Directory!$F$2:$F$500,$B2,Directory!$AZ$2:$AZ$500)

but you'll still have problems if the sum range isn't all numeric
 
Upvote 0

Forum statistics

Threads
1,223,231
Messages
6,170,884
Members
452,364
Latest member
springate

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