SUMIF Not Working Inside IF Statement

mcmuney

Board Regular
Joined
Sep 11, 2015
Messages
101
Office Version
  1. 365
1. I have this formula that works: =SUMIF(H1467:I1467,"<>#N/A",H1467:I1467)

2. Now I'm trying to include the SUMIF formula inside of: =IF(I1467="","",IF(A1467=B1467,H1467,H1467+I1467))

3. Making it: =IF(I1467="","",IF(A1467=B1467,H1467,SUMIF(H1467:I1467,"<>#N/A",H1467:I1467)))

The SUMIF formula works on its own (as shown on #1), but it does not work inside the IF statement (as shown on #3).

H1467 = -177
I1467 = #N/A

#1 result = -177
#2 result = #N/A
#3 result = #N/A

Is there a reason for this? If yes, what's the fix?

Thanks.
 

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.
This part is giving error

I1467=""

Check this and revert -

Excel Formula:
=IF(NOT(ISNA(I1467)),"",IF(A1467=B1467,H1467,SUMIF(H1467:I1467,"<>#N/A",H1467:I1467)))
 
Upvote 0
What should happen if I1467 is #N/A, do you want to show ""
 
Upvote 0
Check this and revert -

Excel Formula:
=IFS(ISNA(I1467),H1467,I1467="","",A1467=B1467,H1467,TRUE,SUMIF(H1467:I1467,"<>#N/A",H1467:I1467))
 
Upvote 0
Another option
Excel Formula:
=IF(OR(ISNA(I1467),A1467=B1467),H1467,IF(I1467="","",SUMIF(H1467:I1467,"<>#N/A",H1467:I1467)))
 
Upvote 0

Forum statistics

Threads
1,223,893
Messages
6,175,242
Members
452,623
Latest member
russelllowellpercy

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