Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 40
Default 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



  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default 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
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,836
Default 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




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to combine Combo Box function with Vlookup function KH Excel Worksheet Functions 2 April 5th 10 01:24 PM
Combine VLOOKUP and IF function so #NA isn't returned as a value from VLOOKUP buffgirl71 Excel Discussion (Misc queries) 12 November 14th 06 11:36 PM
HOW DO I NEST THE VLOOKUP FUNCTION WITH THE LEFT FUNCTION CHAIM Excel Worksheet Functions 1 July 27th 05 09:10 PM
how do I write a vlookup function within an iserror function so t. JBLeeds Excel Worksheet Functions 2 March 16th 05 10:30 AM
I want to use Vlookup function and AND function in a single formu. prakash Excel Worksheet Functions 3 January 25th 05 07:11 AM


All times are GMT +1. The time now is 12:41 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"