I have a conditional format set up to change the color of the cell based on the date in the cell. How can I make the 3rd condition set the cell to no color if the cell is empty?
I have a conditional format set up to change the color of the cell based on the date in the cell. How can I make the 3rd condition set the cell to no color if the cell is empty?
If you're playing with dates, you may need to include a condition for if the cell is >0 and whatever your date conditions are e.g. =And(A1>0,date condition).
Excel sees blank cells as equivalent to 0 when using conditional formatting.
Perhaps you can post your current conditions and what exactly you want to achieve. Then we may better help.
Where there is a will there are many ways.
If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner
Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.
or simply add 3rd condition (although not a professional approach)Originally Posted by tekjock
Cell value is: equal to: =""
and choose colour
starguy
Tahir Aziz
PAKISTAN
https://www.facebook.com/businessexcel
__________________
Forum Rules (read before you post)
Links to the world of Excel
I have 2 conditions set adn they work great, I just need a 3rd condition to say that when the cell is empty have it set to no colorOriginally Posted by NBVC
I think I tried that, but will againOriginally Posted by starguy
Thanks guys
Tek
this approach is valid if need not more conditional formats. however if you need (may be in future) more conditions you can use OR function nested in IF function to return the same results with 3rd condition still available for use.Originally Posted by tekjock
Ok the ="" is not working ... I will show you what I am trying to do and show you what I got.
I want to be able to put a date in a cell, and then in 5 days I want the cell to change color. For example, I put a date in a cell ( March 19, 1007 ) and the cell is Red, then when I open the file on Saturday the 24 the cell changes to green. Now this part I have working by doing the following.
Condition 1
[Cell Value Is] [less than or equal to] [=TODAY()-5]
Green BGD + Yellow txt
Condition 2
[Cell Value Is] [Greater than or equal to] [=TODAY()-5]
Red BGD + Black txt
Now all I need is a 3rd Condition to make a blank cell have no color
thanks
Tek
do only two conditions you use work properly???Originally Posted by tekjock
try following conditions
select the range (I suppose it is A1:A100)
Condition 1
Formula Is =AND(A1<>"",A1<=TODAY()-5)
Green BGD + Yellow txt
Condition 2
Formula Is =AND(A1<>"",A1>TODAY()-5)
Red BGD + Black txt
thank you sir, that works perfectlyOriginally Posted by starguy
tek
pleased to know that it solved your problemOriginally Posted by tekjock
and thank you for the feedback.
This is what I was trying to point out too.Originally Posted by starguy
you were right at this point.Originally Posted by NBVC
Sorry but i'm not the best at excel formulas, but I do appreciate the assistance .Originally Posted by NBVC
thank you
Ok, like i said this works perfectly ... BUT ... is there a way to do the same thing , but make it 5 business days. So when I counts how many days, it excludes the weekends.
I could allways just edit those cells in question to 7 days.
is this possible WITHOUT VB scripting
thanks
Tekjock
Try:
Condition 1:
Formula Is >
=AND(A1<>"",A1<=TODAY()+SIGN(-5)*SMALL(IF((WEEKDAY(TODAY()+SIGN(-5)*(ROW(INDIRECT("1:"&ABS(-5)*10))),2)<6),ROW(INDIRECT("1:"&ABS(-5)*10))),ABS(-5)))
Condition 2:
Formula Is >
=AND(A1<>"",A1>TODAY()+SIGN(-5)*SMALL(IF((WEEKDAY(TODAY()+SIGN(-5)*(ROW(INDIRECT("1:"&ABS(-5)*10))),2)<6),ROW(INDIRECT("1:"&ABS(-5)*10))),ABS(-5)))
That works ...
BUT ...
I actuly solved this a bit simpler. changed my thing above
From :
=AND(Q1<>"",Q1<=TODAY()-5)
To :
=AND(Q1<>"",Q1<=TODAY()-7)
the changing from -5 to -7 compensated for the 2 days.
thank you for all your help
Tekjock
You're welcome...
Actually, my formulas actually account for business days...so they will always exclude Saturdays and Sundays no matter what Today() is.
With your formula you are just subtracting 7 days from Today() which may end up falling on a weekend. But I guess if you are only looking at this spreadsheet during Monday to Friday, then you're formulas will be good enough. If you open the sheet on a weekend, you may not get expected results.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks