if-then-else in VLOOKUP function

H

Himansu

Hello everyone,

Does anyone how to add an "if-then-else" in a vlookup? Here's an example:

=VLOOKUP(E348,Sheet1!A:B,2,FALSE)

---

* Basically I want the formula above to return the value in E348 if the
result is #N/A in the vlookup function above.

Any help with this query will be greatly appreciated.
 
D

Dave Peterson

=if(isna(VLOOKUP(E348,Sheet1!A:B,2,FALSE)),e348,
VLOOKUP(E348,Sheet1!A:B,2,FALSE))

In xl2007, there's an =iferror() function.

I think the syntax would be:

=iferror(VLOOKUP(E348,Sheet1!A:B,2,FALSE),e348)
 

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

Similar Threads

Vlookup Function 1
Need help to fix vlookup function in macro 1
Help With VLOOKUP 2
help with a vlookup 2
VLOOKUP help 2
VLOOKUP & ISNA 2
VLookup Function HELP 7
vlookup issue 2

Top