ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Conditional Formatting for True/False (https://www.excelbanter.com/excel-programming/345063-conditional-formatting-true-false.html)

Phil H.[_2_]

Conditional Formatting for True/False
 

Using all three conditions for green/yellow/red background formats. I

the red condition I need a formula returning a true condition for a
zero, and false when the cell is blank. (Excel treats the blank as
zero
and returns true). For example, if cell H21
holds a zero, the condition would be true and the cell would have a re

background; if H21 was blank, a false condition would exist and no
conditional formatting would be applied - in other words, whatever th

default cell background is, would prevail. What would this formula be

--
Phil H
-----------------------------------------------------------------------
Phil H.'s Profile: http://www.hightechtalks.com/m22
View this thread: http://www.hightechtalks.com/t228056


Tom Ogilvy

Conditional Formatting for True/False
 
=if(len(trim(H21))=0,False,if(H21=0,True,False))

--
Regards,
Tom Ogilvy


"Phil H." wrote in message
...

Using all three conditions for green/yellow/red background formats. In

the red condition I need a formula returning a true condition for a
zero, and false when the cell is blank. (Excel treats the blank as a
zero
and returns true). For example, if cell H21
holds a zero, the condition would be true and the cell would have a red

background; if H21 was blank, a false condition would exist and no
conditional formatting would be applied - in other words, whatever the

default cell background is, would prevail. What would this formula be?


--
Phil H.
------------------------------------------------------------------------
Phil H.'s Profile: http://www.hightechtalks.com/m229
View this thread: http://www.hightechtalks.com/t2280567





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

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