IS ERROR & IF Formula Help

lhk201

New Member
Joined
Feb 27, 2011
Messages
35
I am using the following formula and for some reason when the first if function is false the result is a 0 not a blank ("""") as stated in the formula. Is there a way to correct this? Maybe I need to change it?

=IF(ISERROR((SUMIF(Red!$H$2:$H$1000,$B21Red!N$2:N$1000))+(SUMIF(Blue!$H$2:$H$988,$B21,Blue!N2:N1000))),"",((SUMIF(Red!$H$2:$H$1000,$B21,Red!N$2:N$1000))+(SUMIF(Blue!$H$2:$H$988,$B21,Blue!N2:N1000))))/$C$4

Thanks!
 

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.
Do the relevant ranges contain error values, which would justify having ISERROR? And what is the Excel version you use?
 
Upvote 0
I am using the following formula and for some reason when the first if function is false the result is a 0 not a blank ("""") as stated in the formula. Is there a way to correct this? Maybe I need to change it?

=IF(ISERROR((SUMIF(Red!$H$2:$H$1000,$B21Red!N$2:N$1000))+(SUMIF(Blue!$H$2:$H$988,$B21,Blue!N2:N1000))),"",((SUMIF(Red!$H$2:$H$1000,$B21,Red!N$2:N$1000))+(SUMIF(Blue!$H$2:$H$988,$B21,Blue!N2:N1000))))/$C$4

Thanks!
Well, for starters we can get rid of a bunch of ( )...

=IF(ISERROR(SUMIF(Red!$H$2:$H$1000,$B21,Red!N$2:N$1000)+SUMIF(Blue!$H$2:$H$988,$B21,Blue!N2:N1000)),"",SUMIF(Red!$H$2:$H$1000,$B21,Red!N$2:N$1000)+SUMIF(Blue!$H$2:$H$988,$B21,Blue!N2:N1000))/$C$4

You also have some ranges that aren't the same size.

Now, I'm not sure why you're trapping errors that might come from the SUMIFs. Typically, they don't return errors.

You will get an error if C4 is an empty cell or if it contains numeric 0.

See if this does what you want:

=IF($C$4=0,"",(SUMIF(Red!$H$2:$H$1000,$B21,Red!N$2:N$1000)+SUMIF(Blue!$H$2:$H$1000,$B21,Blue!$N$2:$N$1000))/$C$4)
 
Last edited:
Upvote 0
Unfortunately none of these formula seem to work. Let me explain a little more

$C$4 = total number of accounts in area a (10 areas in total)

$H$2:$H$1000 = whether the area is a, b, c, d, e, f, g, h, i or j

N$2:N$1000 = numerica value associated to the account

$b$21 = text saying "area a"

so the formula needs to average only accounts within the range that are area a, however when there area no figures in any of the area a accounts the result should be blank and not 0 which is currenly showing.



Any suggestions?
 
Upvote 0
Unfortunately none of these formula seem to work. Let me explain a little more

$C$4 = total number of accounts in area a (10 areas in total)

$H$2:$H$1000 = whether the area is a, b, c, d, e, f, g, h, i or j

N$2:N$1000 = numerica value associated to the account

$b$21 = text saying "area a"

so the formula needs to average only accounts within the range that are area a, however when there area no figures in any of the area a accounts the result should be blank and not 0 which is currenly showing.



Any suggestions?
What version of Excel are you using?
 
Upvote 0
I am using 2003

I am trying to do the same for this formula:

=IF(ISERROR(SUM(C18:C19))/2,"",SUM(C18:C19)/2)

but it comes back as 0 when there is no value instead of being blank which is what I wanted. So I have the same problem with this one!!!
 
Upvote 0
I am using 2003

I am trying to do the same for this formula:

=IF(ISERROR(SUM(C18:C19))/2,"",SUM(C18:C19)/2)

but it comes back as 0 when there is no value instead of being blank which is what I wanted. So I have the same problem with this one!!!
OK, try this version...

=IF($C$4=0,"",IF(SUMIF(Red!$H$2:$H$1000,$B21,Red!N$2:N$1000)+SUMIF(Blue!$H$2:$H$1000,$B21,Blue!$N$2:$N$1000)=0,"",(SUMIF(Red!$H$2:$H$1000,$B21,Red!N$2:N$1000)+SUMIF(Blue!$H$2:$H$1000,$B21,Blue!$N$2:$N$1000))/$C$4))
 
Upvote 0
I am using 2003

I am trying to do the same for this formula:

=IF(ISERROR(SUM(C18:C19))/2,"",SUM(C18:C19)/2)

but it comes back as 0 when there is no value instead of being blank which is what I wanted. So I have the same problem with this one!!!

Either...

=IF(COUNT(C18:C19),AVERAGE(C18:C19),"")

Or...

=IF(COUNT(C18:C19),SUM(C18:C19)/COUNT(C18:C19),"")

There is no need for an IsEroor check per se.
 
Upvote 0

Forum statistics

Threads
1,224,600
Messages
6,179,833
Members
452,947
Latest member
Gerry_F

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