Forum Discussion
The_Mage
Mar 06, 2023Copper Contributor
2 subject formatting
I have a simple spreadsheet that contains a date on the left, and cells to the right that I would like to format if 2 conditions are met. If the cell is empty, and if it is the current date. If y...
SnowMan55
Mar 13, 2023Bronze Contributor
Your description is a bit vague for a solution to be given with confidence, but… If the column containing date values is column A, and if the first column (of multiple, it seems) that you are expecting to highlight if it does not contain an entry is B, and if every cell to which you will apply the conditional formatting (CF) has a date in column A, then this CF formula should work for cell B2 as the base cell:
=AND( B2="", $A2=TODAY() )
(The spaces are not required, but make the example more readable.)
The_Mage
Mar 13, 2023Copper Contributor
I don't know why but I really screwed up writing this.
First I meant to say "2 condition formatting", not 2 subject formatting.
Next, I also screwed up by putting the "current date" rather than the "current month" in the question.
I did get an answer on another forum with:
=AND(MONTH($A2)=MONTH(TODAY()),ISBLANK($B2))
The only issue is that my spreadsheet shows 2 years on it, and the same month the next year also highlights.
I meant to come back and edit the question, but got busy and kind of spaced off about it. Sorry about that.
Anyway, thanks.
First I meant to say "2 condition formatting", not 2 subject formatting.
Next, I also screwed up by putting the "current date" rather than the "current month" in the question.
I did get an answer on another forum with:
=AND(MONTH($A2)=MONTH(TODAY()),ISBLANK($B2))
The only issue is that my spreadsheet shows 2 years on it, and the same month the next year also highlights.
I meant to come back and edit the question, but got busy and kind of spaced off about it. Sorry about that.
Anyway, thanks.
- SnowMan55Mar 13, 2023Bronze Contributor
<< The only issue is that my spreadsheet shows 2 years on it, and the same month the next year also highlights. >>
Ah, well that's easily fixed by adding another test for the AND function to work on:
=AND(YEAR($A2)=YEAR(TODAY()), MONTH($A2)=MONTH(TODAY()), ISBLANK($B2))