ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   vlookup, but ignore errors if #n/a (https://www.excelbanter.com/excel-worksheet-functions/42159-vlookup-but-ignore-errors-if-n.html)

Jess

vlookup, but ignore errors if #n/a
 
I have 2 worksheets and I am using the vlookup to pull data from worksheet 2
for worksheet 1. Then, on worksheet 1, I am using the sum function to add the
numbers together.

However, there are several cells on worksheet 1 that have #n/a because there
is no information on worksheet 2 to pull from. This causes an issue with the
sum function. Is there a way to have these cells change from #n/a to zero or
null?

db

Yep -

=IF(ISERROR(VLOOKUP(...)),0,VLOOKUP(...))

--
Regards,
db


"Jess" wrote:

I have 2 worksheets and I am using the vlookup to pull data from worksheet 2
for worksheet 1. Then, on worksheet 1, I am using the sum function to add the
numbers together.

However, there are several cells on worksheet 1 that have #n/a because there
is no information on worksheet 2 to pull from. This causes an issue with the
sum function. Is there a way to have these cells change from #n/a to zero or
null?


chisigs2

try something like this.... I use this one not sure it will work in a
vlookup though

=IF(N(F13),H13-H12,0)


Aladin Akyurek

=SUMIF(Range,"<#N/A")

Jess wrote:
I have 2 worksheets and I am using the vlookup to pull data from worksheet 2
for worksheet 1. Then, on worksheet 1, I am using the sum function to add the
numbers together.

However, there are several cells on worksheet 1 that have #n/a because there
is no information on worksheet 2 to pull from. This causes an issue with the
sum function. Is there a way to have these cells change from #n/a to zero or
null?



All times are GMT +1. The time now is 02:45 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com