ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Blank or Zero or None? (https://www.excelbanter.com/excel-programming/411644-blank-zero-none.html)

HH[_4_]

Blank or Zero or None?
 
My formula in E4 is: =IF(B4<TODAY(),SUM(25+H4),"")

Works great when I put a date in B4. But - if I accidently put a date in B4
and then delete it, the value stays in E4.

How do I get the value to disappear if I delete the date?

Hank



Rick Rothstein \(MVP - VB\)[_2013_]

Blank or Zero or None?
 
You could use this formula instead I guess...

=IF(AND(B4<TODAY(),B4<""),SUM(25+H4),"")

Rick


"HH" wrote in message
. ..
My formula in E4 is: =IF(B4<TODAY(),SUM(25+H4),"")

Works great when I put a date in B4. But - if I accidently put a date in
B4 and then delete it, the value stays in E4.

How do I get the value to disappear if I delete the date?

Hank



JW[_2_]

Blank or Zero or None?
 
On May 28, 1:17*pm, "HH" wrote:
My formula in E4 is: =IF(B4<TODAY(),SUM(25+H4),"")

Works great when I put a date in B4. *But - if I accidently put a date in B4
and then delete it, the value stays in E4.

How do I get the value to disappear if I delete the date?

Hank


=IF(AND(B4<TODAY(),NOT(ISBLANK(B4))),25+H4,"")
-or-
=IF(OR(B4=TODAY(),ISBLANK(B4)),"",25+H4)

HH[_4_]

Blank or Zero or None?
 
Thanks JW,
Worked great!

"JW" wrote in message
...
On May 28, 1:17 pm, "HH" wrote:
My formula in E4 is: =IF(B4<TODAY(),SUM(25+H4),"")

Works great when I put a date in B4. But - if I accidently put a date in
B4
and then delete it, the value stays in E4.

How do I get the value to disappear if I delete the date?

Hank


=IF(AND(B4<TODAY(),NOT(ISBLANK(B4))),25+H4,"")
-or-
=IF(OR(B4=TODAY(),ISBLANK(B4)),"",25+H4)




All times are GMT +1. The time now is 03:35 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com