Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default How do I return "leave cell blank" using IF logic.

=IF(ISBLANK(D40),NULL,TODAY()) does not work since NULL is not a function.
Tried many combinations but something is always returned when the cell is
blank. The column of cells are formated for date.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,501
Default How do I return "leave cell blank" using IF logic.

Maybe

=IF(ISBLANK(D40),"",TODAY())

Mike

"tlm1tlm" wrote:

=IF(ISBLANK(D40),NULL,TODAY()) does not work since NULL is not a function.
Tried many combinations but something is always returned when the cell is
blank. The column of cells are formated for date.

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,059
Default How do I return "leave cell blank" using IF logic.

On Apr 8, 10:57*am, Mike H wrote:
Maybe
=IF(ISBLANK(D40),"",TODAY())


Probably meets the OP's needs. That is, it certainly corrects the
OP's use of ISBLANK().

But caution: ironically, that does not "leave a cell blank", if by
that the OP means ISBLANK() would return true.

Let me clarify. Suppose A1 contains =if(isblank(B1),"",today()), and
suppose B1 is blank. A1 will __appear__ blank. But if A2 contains
=if(isblank(A1),"",today()), A2 will display TODAY() because A1 is not
"blank" in the sense that Excel uses the term. ("Blank" means empty
-- no formula or value.)

In my example, the following is more robust:

A1: =if(B1="", "", today())
A2: =if(A1="", "", today())

B1="" is true if B1 is empty (no formula or value) and if B1 contains
a null string (""), either the result of a formula like above or ="".

Note, however, that B1="" is __not__ true if B1 contains a string of
blanks (e.g. " "), even though that also appears "blank". For that,
you need:

=if(trim(B1)="", "", today())
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 22,906
Default How do I return "leave cell blank" using IF logic.

You cannot have a truly blank cell if you have a formula in it

Excel does not recognize a Null value.

=IF(ISBLANK(D40),"",TODAY() is the closest you can come but is not blank.


Gord Dibben MS Excel MVP

On Tue, 8 Apr 2008 10:51:02 -0700, tlm1tlm
wrote:

=IF(ISBLANK(D40),NULL,TODAY()) does not work since NULL is not a function.
Tried many combinations but something is always returned when the cell is
blank. The column of cells are formated for date.


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
Check if cells contain the word "Thailand", return "TRUE" ali Excel Worksheet Functions 7 September 14th 07 09:53 AM
To leave a cell blank following an "IF" function abie26 Excel Worksheet Functions 9 April 11th 07 09:44 PM
Return blank for true "if" statement when charting, not 0 Jay F Charts and Charting in Excel 1 June 21st 06 04:15 PM
Leave cell data (IF(ISNA(VLOOKUP) is TRUE instead of returning blank (" ") or #NA [email protected] Excel Worksheet Functions 6 October 27th 05 04:02 PM
Changing "returned" values from "0" to "blank" LATATC Excel Worksheet Functions 2 October 20th 05 04:41 PM


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

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

About Us

"It's about Microsoft Excel"