Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 35
Default VLOOKUP worksheet function returns zero for empty cells

I am using VLOOKUP to get address information from one "master" worksheet to
another. Some of the master cells are empty (not blank); the value returned
by VLOOKUP in such cases is zero, not blank.

How can I prevent that without calling the function twice in each formula?
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,722
Default VLOOKUP worksheet function returns zero for empty cells

If you don't want to change the VLOOKUP, change the master data.

Select cells in question.
Bring up Find & Replace (Ctrl+H)

Leave first line blank
In second line, input:
=""

Under options, select match entire cell contents. Then replace all. Your
formula should now return a blank when it finds a "blank" cell.
--
Best Regards,

Luke M
*Remember to click "yes" if this post helped you!*


"Hershmab" wrote:

I am using VLOOKUP to get address information from one "master" worksheet to
another. Some of the master cells are empty (not blank); the value returned
by VLOOKUP in such cases is zero, not blank.

How can I prevent that without calling the function twice in each formula?

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default VLOOKUP worksheet function returns zero for empty cells

If the data being returned is text you could use a custom format that
suppresses the display of 0 values. The cell will still contain a numeric 0
it just won't be displayed making the cell appear blank. Otherwise, you
either have to repeat the formula or fill the empty cells with blanks.

To suppress the display of 0:

FormatCellsNumber tabCustom
General;-General;

Or, repeat the formula:

=IF(VLOOKUP(...)="","",VLOOKUP(...))

--
Biff
Microsoft Excel MVP


"Hershmab" wrote in message
...
I am using VLOOKUP to get address information from one "master" worksheet
to
another. Some of the master cells are empty (not blank); the value
returned
by VLOOKUP in such cases is zero, not blank.

How can I prevent that without calling the function twice in each formula?



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 35
Default VLOOKUP worksheet function returns zero for empty cells

Unfortunately the first idea will not apply in my circumstances. I am using
this result in a Word Mailmerge where the 0 will be displayed regardless of
its Excel format.

"T. Valko" wrote:

If the data being returned is text you could use a custom format that
suppresses the display of 0 values. The cell will still contain a numeric 0
it just won't be displayed making the cell appear blank. Otherwise, you
either have to repeat the formula or fill the empty cells with blanks.

To suppress the display of 0:

FormatCellsNumber tabCustom
General;-General;

Or, repeat the formula:

=IF(VLOOKUP(...)="","",VLOOKUP(...))

--
Biff
Microsoft Excel MVP


"Hershmab" wrote in message
...
I am using VLOOKUP to get address information from one "master" worksheet
to
another. Some of the master cells are empty (not blank); the value
returned
by VLOOKUP in such cases is zero, not blank.

How can I prevent that without calling the function twice in each formula?




  #5   Report Post  
Junior Member
 
Posts: 1
Default

This problem was getting the best of me and I couldn't find any other suggestions that worked. Thanks!

Quote:
Originally Posted by Luke M View Post
If you don't want to change the VLOOKUP, change the master data.

Select cells in question.
Bring up Find & Replace (Ctrl+H)

Leave first line blank
In second line, input:
=""

Under options, select match entire cell contents. Then replace all. Your
formula should now return a blank when it finds a "blank" cell.
--
Best Regards,

Luke M
*Remember to click "yes" if this post helped you!*


"Hershmab" wrote:

I am using VLOOKUP to get address information from one "master" worksheet to
another. Some of the master cells are empty (not blank); the value returned
by VLOOKUP in such cases is zero, not blank.

How can I prevent that without calling the function twice in each formula?
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 function that returns the greates/oldest of many to one confused!! Excel Worksheet Functions 3 March 30th 09 07:17 PM
Vlookup function returns duplicate values Bigbelt Excel Discussion (Misc queries) 5 December 18th 08 02:27 AM
VLookup that returns two separate cells instead of only one Jake Excel Worksheet Functions 3 December 13th 08 02:26 PM
How do I write a VLOOKUP function that returns 0's, not neg vals? dbsavoy Excel Worksheet Functions 4 August 24th 06 05:26 PM
Function that Returns Worksheet Name Moset Excel Discussion (Misc queries) 3 July 12th 05 04:07 PM


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