google-sheetsconditional-formatting

conditional formatting on a single cell where criteria is another column [solved]


Cell A1 contains the text "FLAG". Column B contains dates. I want to apply conditional formatting to cell A1 if any date in column B is less than 2 days from today(), and if the date is past today().

An example of what I've tried:

Column B:

10/12/2024

11/12/2024

06/12/2024

Assuming today is 04/12/2024, conditional formatting applied to Cell A1:

=$B$1:$B>TODAY()+2

I would expect cell A1 to flag as it meets the criteria with date 06/12/2024.

=$B$1:$B>TODAY()+1

I wouldn't expect cell A1 to flag.

If I add the date 01/12/2024 to column B and remove 06/12/2024,

I would expect the cell A1 to flag with either of what I've tried.

Neither option has the desired result.

Thanks.


Solution

  • Custom formula is:

    =+sort(xmatch({today()+1;today()+2},B:B))
    

    enter image description here