ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   if-then-else in VLOOKUP function (https://www.excelbanter.com/excel-programming/425991-if-then-else-vlookup-function.html)

Himansu

if-then-else in VLOOKUP function
 
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.

--
Thanks,
Himansu




Dave Peterson

if-then-else in VLOOKUP function
 
=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)


Himansu wrote:

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.

--
Thanks,
Himansu


--

Dave Peterson

ryguy7272

if-then-else in VLOOKUP function
 
You can do lots of things:
http://www.mrexcel.com/forum/showthread.php?t=51
http://www.techonthenet.com/excel/formulas/vlookup.php
http://office.microsoft.com/en-us/ex...093351033.aspx

Best for last:
http://contextures.com/xlFunctions02.html#IF


HTH,
Ryan---

--
Ryan---
If this information was helpful, please indicate this by clicking ''Yes''.


"Himansu" wrote:

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.

--
Thanks,
Himansu






All times are GMT +1. The time now is 04:58 PM.

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