Remove #n/a in vlookup to sum results

D

duketter

Excel 2007 - I have vlookup formulas in cell c2 and d2. In c2 the result of
the vlookup is 5 and in d2 the results of the vlookup is #n/a. I then need
to sum cell c2 and d2 but I cannot since d2 contains #n/a. How can I
remove/change this so I can sum these two cells together?

Thanks!
 
J

Jacob Skaria

Try
=SUMIF(C2:D2,"<>#N/A")

You can handle the #na in your VLOOKUP() formula like

=IF(ISNA(vlookupformula),0,vlookupformula)
or
=IF(ISNA(vlookupformula),"",vlookupformula)

If this post helps click Yes
 
P

Per Jessen

Hi

Use an if statement to check for the error like this:

=If(Iserror(Vlookup(.....)),0,Vlookup(…))

Regards,
Per
 
D

Dave Peterson

You could modify your formula so that it returns a 0 (or "") if there was no
match found.

In xl2007 only:
=iferror(vlookup(...),0)
or
=iferror(vlookup(...),"")

But you could use a different formula that =sum(C2:d2) or =c2+d2:
=sumif(C2:D2,"<1e37")

1E37 is just a giant number (1 followed by 37 0's)
 
D

duketter

When I try the ISNA formula I get the following error:
"You've entered too many arguments for this function.

It highlights the zero in my formula

here is my formula:

=IF(ISNA(VLOOKUP(Users!E2,'2nd door pivot
table'!$A$29:$B$50,2,FALSE),0,VLOOKUP(Users!E2,'2nd door pivot
table'!$A$29:$B$50,2,FALSE))
 
J

Jacob Skaria

Try the below...ISNA() closing braces were missing

=IF(ISNA(VLOOKUP(Users!E2,'2nd door pivot able'!$A$29:$B$50,2,FALSE))
,0,VLOOKUP(Users!E2,'2nd door pivot table'!$A$29:$B$50,2,FALSE))

If this post helps click Yes
 

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