Formulae when some cells contain #N/A

G

Guest

How do I sum cells that include #N/A in the range. The #N/A is the result of
a lookup formulae. I want such cells to register as 0. Currently the sum of
the cells gives #N/A as the answer.
Thanks
 
N

Nick Hodge

Heather

Use the ISNA function, thus

=IF(ISNA(ExistingVlookup),0,ExistingVlookup)

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
(e-mail address removed)
 
E

EdWeitz

-----Original Message-----
Always try and fix errors at source rather than compensating for them.

--
Regards
Ken....................... Microsoft MVP - Excel
Sys Spec - Win XP Pro / XL 97/00/02/03

---------------------------------------------------------- ------------------
It's easier to beg forgiveness than ask permission :)
---------------------------------------------------------- ------------------

#N/A is the result
of Currently the sum
of

You can try using IIf Function

or If Then constructs.
 
G

Guest

I am having the same problem!
I have several data tables of identical layout that are updated daily, the
first two manually and the others by preset formula that calculates from the
first two. If a zero or no data are input into cells in the first two then
the formula of the others will return #NA, this is intentional because charts
are plotted from the latter tables and #NA prevents zero's being plotted all
over it for data that has not been entered yet (zero is a valid in negative
and positive data entry only when entered).

Each table has a SUM total but if #NA exits in any of the cells totaled the
SUM is returned #NA.
 
G

Guest

PS I tried the ISNA method you proposed (assuming that ExistingVlookup was
the range) but that resulted in #VALUE!
 
D

Dave Peterson

existingvlookup was a shortcut for not writing your formula.


It would look more like this in real life:

=if(isna(vlookup(a1,sheet2!a1:b99,2,false),0,vlookup(a1,sheet2!a1:b99,2,false)))
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top