Forum Discussion

The_Mage's avatar
The_Mage
Copper Contributor
Mar 06, 2023
Solved

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 you want to know the reason, it is to track payments on credit cards and make it simple to know if a payment has been made or not.

 

At the same time, I don't want to highlight every cell for the next 2 years. 

  • The_Mage 

    << 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))

3 Replies

  • SnowMan55's avatar
    SnowMan55
    Bronze Contributor

    The_Mage 

    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's avatar
      The_Mage
      Copper 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.
      • SnowMan55's avatar
        SnowMan55
        Bronze Contributor

        The_Mage 

        << 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))

Resources