Evaluating a condition in a cell and applying a format accordingly maybe seem to be rather straight forward. But somethimes thing may prove to be a little tricky.
Suppose column A contains a list of Expiry Dates which you want to keep track, and conditional formatting is applied to the whole column which includes blank cells.
Conditions:
1. If the date today is earlier than the expiry date then the cell is White.
2. If the date today is equal to the expiry date then the cell is Yellow.
3. If the date today is later the expiry date then the cell is Red.
Since these three conditions are mutally exclusive, what you would enter as the evaluation formula will probably look like this:
Condition 1: =A1=TODAY( )
Condition 2: =A1<TODAY( )
Result:
The result that you will get may be a little unexpected. When the date today is earlier, equal or later than the expiry date, the cell will be White, Yellow and Red respectively. However, the rest of the remaining blank cells in the column will turn Red too. This is because blank cells will be evaluated to TRUE with A1<TODAY( ).
There is actually a fourth condition, that is, a cell can be a blank cell.
Therefore:
An extra condition to evaluate whether a cell is empty has to be added.
Condition 1: =A1="", No change to format
Condition 2: =A1=TODAY( )
Condition 3: =A1<TODAY( )
Take note that A1="" must be placed before <TODAY( ) so that empty cells will remain White.