#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 15
Default Blank Cell

I am using VLOOKUP to find and enter an associated time value in a cell (D2)
that is referencing another cell (D1). D1 generally blank until a text choice
is made using a drop-down list. I would like to not have the #N/A message in
D2 when D1 is blank. I could put in a generic character (such as ?) and use
the IF function. However, I was wondering if there is a way determine a blank
cell directly using the IF function?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35
Default Blank Cell

To determine blank cell, just type two quotation marks:
=If(D1="", True, False)


"quattda" wrote:

I am using VLOOKUP to find and enter an associated time value in a cell (D2)
that is referencing another cell (D1). D1 generally blank until a text choice
is made using a drop-down list. I would like to not have the #N/A message in
D2 when D1 is blank. I could put in a generic character (such as ?) and use
the IF function. However, I was wondering if there is a way determine a blank
cell directly using the IF function?

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 15
Default Blank Cell

Thanks

"Anony" wrote:

To determine blank cell, just type two quotation marks:
=If(D1="", True, False)


"quattda" wrote:

I am using VLOOKUP to find and enter an associated time value in a cell (D2)
that is referencing another cell (D1). D1 generally blank until a text choice
is made using a drop-down list. I would like to not have the #N/A message in
D2 when D1 is blank. I could put in a generic character (such as ?) and use
the IF function. However, I was wondering if there is a way determine a blank
cell directly using the IF function?

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 97
Default Blank Cell

I am using VLOOKUP to find and enter an associated time value in a
cell (D2) that is referencing another cell (D1). D1 generally blank
until a text choice is made using a drop-down list. I would like to
not have the #N/A message in D2 when D1 is blank. I could put in a
generic character (such as ?) and use the IF function. However, I was
wondering if there is a way determine a blank cell directly using the
IF function?


If it helps, I use a UDF to return zero (or you could change this value to
suit yourself) if VLOOKUP returns #N/A:

Function NewVLookup(Value As Variant, Table As Variant, _
ColIndex As Integer, RangeLookup As Boolean) As Variant
With Application
If .IsNA(.VLookup(Value, Table, _
ColIndex, RangeLookup)) Then
NewVLookup = 0 ' <========== or put your own value here
Else
NewVLookup = .VLookup(Value, Table, ColIndex, RangeLookup)
End If
End With
End Function


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
Average Formula to display blank cell if named range is blank Rachael F Excel Worksheet Functions 3 February 22nd 08 05:05 PM
Start Cell B1 then find first blank cell, insert subtotal, next non blank, then next blank, sutotal cells in between......... [email protected][_2_] Excel Programming 2 June 7th 07 09:27 PM
Need macro to check if cell is not blank & previous cell is blank, copy information from row above & paste JenIT Excel Programming 4 April 12th 07 08:56 PM
Copy to first Blank cell in Colum C Non blank cells still exist be Ulrik loves horses Excel Programming 2 October 8th 06 07:35 PM
COPY A CONCATENATE CELL TO BLANK CELL PUTTING IN THE NEXT BLANK C. QUEST41067 Excel Discussion (Misc queries) 1 January 15th 05 09:29 PM


All times are GMT +1. The time now is 01:51 AM.

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"