In the worksheet shown, column D records the date a task is completed.
If column D contains a date (i.e.
is not empty), we can assume the task is complete.
This problem can be solved with the IF function alone or with the IF function and the ISBLANK function.
It can also be solved with the LEN function.
All three approaches are explained below.
The ISBLANK function returns TRUE when a cell is empty and FALSE if not.
The logic now isif cell D5 is blank.
We are not asking Excel if A1 is blank, we are literally counting the characters in A1.
The LEN function will return a non-zero number only when a cell contains actual characters.
Using the LEN function this way works for cells containing formulas as well as cells without formulas.
When a date is entered in column D, the formatting will be applied.More examples here.
More than one condition can be tested by nesting IF functions.
For example, if A1 contains “apple”, ISBLANK(A1) returns FALSE.
NOT Function
The Excel NOT function returns the opposite of a given logical or Boolean value.
When given TRUE, NOT returns FALSE.
When given FALSE, NOT returns TRUE.
Use the NOT function to reverse a logical value.