Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,726
Default vlookup function that returns blank if error

=IF(ISNA(vlookup_formula),"",vlookup_formula)

--
---
HTH

Bob

(change the xxxx to gmail if mailing direct)


"Richard" wrote in message
...

The normal vlookup function returns a NA if the table_array doesn't
contain
the lookup_value.

Can you help me write a new function that returns a blank or "" instead?


--
Richard



  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,726
Default vlookup function that returns blank if error

I wouldn't do that, I would put the Vlookup formula in a helper cell, and
then test that helper cell for #N/A

--
---
HTH

Bob

(change the xxxx to gmail if mailing direct)


"Richard" wrote in message
...
Right. I have been frequently using your if statement in my worksheets.
However, it is a long statement and I often have to retype/proof to get it
correct.

I was looking for a function that I could define in a macro.
Combining the application.worksheetfunction format with ISNA and Vlookup
commands in a macro was giving me problems.


--
Richard


"Bob Phillips" wrote:

=IF(ISNA(vlookup_formula),"",vlookup_formula)

--
---
HTH

Bob

(change the xxxx to gmail if mailing direct)


"Richard" wrote in message
...

The normal vlookup function returns a NA if the table_array doesn't
contain
the lookup_value.

Can you help me write a new function that returns a blank or ""
instead?


--
Richard






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
VLOOKUP returns a 0 and I want a blank KimB Excel Worksheet Functions 7 May 12th 23 07:45 PM
VLOOKUP returns 0 (zero) when lookup cell is blank C.T. Excel Discussion (Misc queries) 5 April 1st 10 01:31 AM
VLOOKUP returns 0 (zero) when lookup cell is blank Maki Excel Discussion (Misc queries) 5 October 11th 08 07:22 AM
If Vlookup returns error enter 0 Midwest User Excel Worksheet Functions 2 March 28th 06 05:14 PM
Vlookup finds a blank, but returns a zero - HELP! flummoxed Excel Discussion (Misc queries) 6 January 18th 05 03:15 PM


All times are GMT +1. The time now is 06:18 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"