How to ignore #N/A in the summation of a column

jamesc1987

New Member
Joined
Aug 17, 2011
Messages
9
Hello everybody.

I am having a problem with a complicated workbook I have inherited at work.

Currently, a cell with the formula =SUMIF(D$3:D$149,1,H$3:H$149) is returning a #N/A value because there are several #N/A cells in column H.

How would I amend the formula to ignore any #N/A cells?

I have tried the following =SUMIF(D$3:D$149,1,H$3:H$149,"<>#N/A") but have had no luck.

Any help is much appreciated!!

Regards.
 

Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.
Welcome to the board...

You might be better served by eliminating the #N/A errors at the source in column H.

What is the formula you have in column H?
What version of Excel are you using?
 
Upvote 0
The cells that are returning #N/A are somehow sourcing data from an IBM sales database, if there is a sale the #N/A will change, so I want to avoid changing any values for the cells in column H if possible.

Here is a typical formula for one of the cells in column H:

=VLOOKUP($A137,'Rolling # Tests'!$A$2:$AT$76,ReportMonth,FALSE)


If possible I would like to leave all of the cells in column H as they are, and manipulate the formula I am using to try and add them together.

Thanks for the suggestions. :-)
 
Last edited:
Upvote 0
Is there some formula in column H?
The formula can be adjusted to return 0 if it's #N/A
And still return the correct values otherwise.


If you insist on leaving column H alone,

Try this array formula entered with CTRL + SHIFT + ENTER
=SUM(IF(ISNUMBER(H$3:H$149),IF(D$3:D$149=1,H$3:H$149)))
 
Upvote 0
Hi Jonmo1,

I thought that new formula had promise but unfortunately it returned a value of 0. (Clearly wrong).

I'm afraid I have to leave the column H formulas as they are, the workbook was not built by me and is incredibly complex and interlinked, I don't have the expertise or confidence to make changes.

As for summing up the contents of column H, I have been reading around 'SUMIFS' where you can choose multiple criteria, this sounds like it could work but again I'm afraid nothing I have tried works... probably the way I'm writing the formula.
 
Upvote 0
Hi Jonmo1,

I thought that new formula had promise but unfortunately it returned a value of 0. (Clearly wrong).

This is likely because you didn't enter the formula correctly.

It is an array formula that requires special entry.
After entering the formula
Highlight the cell with the formula and press F2
Then press CTRL + SHIFT + ENTER
When entered correctly, the formula will be enclosed in {brackets}
 
Upvote 0
Have a little confidence...

If you're at all worried, save a copy of the file.

Then change this
=VLOOKUP($A137,'Rolling # Tests'!$A$2:$AT$76,ReportMonth,FALSE)
to
=IF(ISNA(VLOOKUP($A137,'Rolling # Tests'!$A$2:$AT$76,ReportMonth,FALSE)),0,VLOOKUP($A137,'Rolling # Tests'!$A$2:$AT$76,ReportMonth,FALSE))

This will make them return 0 instead of #N/A
And a plain old sumif will work just fine.
 
Upvote 0
Glad to help, thanks for the feedback..

Just out of curiousity, which solution did you use?
the Array formula to sumif ignoring #N/A errors
or
Change the vlookup to return 0 instead of #N/A
 
Upvote 0

Forum statistics

Threads
1,224,613
Messages
6,179,903
Members
452,948
Latest member
Dupuhini

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