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

EXCEL - IF(IFERROR(VLOOKUP question 0
Excel IF statement with vlookup 2
Vlookup result in a message box 10
using vlookup in vba 10
VLOOKUP help 2
VLOOKUP & ISNA 2
VBA userform Vlookup Excel 1
Nested VLOOKUP in IF statement 2

Top