Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
Haz Haz is offline
external usenet poster
 
Posts: 46
Default Vlookup to return blank cell if nothing in range

Hi,

I have a Vlookup as this =if(g12="","",VLOOKUP(g12, NameAccno,2,0)). I would
like this function to return a blank cell if there is no entry in "name
accno" to match. at the moment it returns 0. I am using this as part of a
drop down selection on another cell.

also, Is it possible to make the above formula cell undeletable so it is
always there?


  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,501
Default Vlookup to return blank cell if nothing in range

perhaps

=IF(G12="","",IF(ISNA(VLOOKUP(G12, NameAccno,2,0)),"",VLOOKUP(G12,
NameAccno,2,0)))

Mike

"Haz" wrote:

Hi,

I have a Vlookup as this =if(g12="","",VLOOKUP(g12, NameAccno,2,0)). I would
like this function to return a blank cell if there is no entry in "name
accno" to match. at the moment it returns 0. I am using this as part of a
drop down selection on another cell.

also, Is it possible to make the above formula cell undeletable so it is
always there?


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,856
Default Vlookup to return blank cell if nothing in range

You could leave the formula as it is and apply conditional formatting
to the cell, such that if the cell content is zero then apply a white
font (which on a white background would appear to be blank).
Alternatively, change the formula to this:

=IF(G12="","",IF(VLOOKUP(g12, NameAccno,2,0)=0,"",VLOOKUP(g12,
NameAccno,2,0)))

You can use Format | Cells | Protection tab to Lock the cell and even
set it to Hidden, and this will come into effect if you use Tools |
Protection | Protect Worksheet, where you can password-protect the
sheet so that users will not be able to change the locked cells. Note,
though, that the passwords are easily broken.

Hope this helps.

Pete

On Apr 15, 8:12*pm, Haz wrote:
Hi,

I have a Vlookup as this =if(g12="","",VLOOKUP(g12, NameAccno,2,0)). I would
like this function to return a blank cell if *there is no entry in "name
accno" to match. at the moment it returns 0. I am using this as part of a
drop down selection on another cell.

also, Is it possible to make the above formula cell undeletable so it is
always there?


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
Return blank cell if value you vlookup is not on pivot Franky88 Excel Worksheet Functions 1 June 5th 07 10:01 PM
Return cell adress for next non-blank cell in a range toreadore Excel Worksheet Functions 1 June 28th 06 12:37 PM
Vlookup return 0 when cell is blank Paul Excel Worksheet Functions 2 January 11th 06 05:01 PM
find the first blank cell in a range and return me it's position steve alcock Links and Linking in Excel 2 May 13th 05 09:03 AM
if the value of a cell in a range is not blank, then return the v. kvail Excel Worksheet Functions 2 April 8th 05 10:07 PM


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