Conditional Formating Question

Joneye

Well-known Member
Joined
May 28, 2010
Messages
785
Office Version
  1. 365
  2. 2019
Platform
  1. Windows
  2. MacOS
I would like a formula to do the below.

Cell A1 has a date in it, if the date is greater than today it turns green, if less than today it turns red. If no date is in the cell the cell is white.

The formula i have at the moment is;

Red =AND($A1<TODAY())
Green =AND($A1<TODAY())
White ?????

Now because of the way excel works the cell date with nothing in if im correct is 01/01/1900. Hence why im failing.

Any help BRILL
 

Excel Facts

Can you AutoAverage in Excel?
There is a drop-down next to the AutoSum symbol. Open the drop-down to choose AVERAGE, COUNT, MAX, or MIN
I think something has corrupted the way your formula appeared in your post.

Did you try to post formulas including the
<
(less than) symbol ?
or
>
(greater than) symbol ?

If yes, try leaving a space after the character. This is a recognised bug on this board.

If there is no date in the cell, what would it contain ?
Would it be blank ? Or text ? Or a number that is not a date ?
 
Upvote 0
= AND ( $ A 1 < TODAY () )

Agreed thats the formula,
 
Upvote 0
OK thanks. So, what about my final question(s) - what will the cell contain if it doesn't contain a date ?
 
Upvote 0
If the cell is empty it turns red as excel reconise the cell as 01/01/1900. I need this to be ignored if the cell has no date.
 
Upvote 0
OK. Then maybe something like this
Code:
=and(a1> 0,a1< today())

By the way, if you have this formula
Code:
=and(a1< today())
it looks as if the AND is not doing anything useful and you can simplify to
Code:
=a1< today()
 
Upvote 0
OK now i have learnt something..

THAT WORKS A DAM TREAT.... many thanks
 
Upvote 0

Forum statistics

Threads
1,224,616
Messages
6,179,912
Members
452,949
Latest member
beartooth91

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top