Google Sheets – Formatting Cells Based on Upcoming Date

conditional formattinggoogle sheets

I am trying to format a cell to be highlighted red if the following conditions are true:

  • the future date associated with that row (which is in a separate cell) is less than 21 days from today, and
  • the cell (which is the one I want to format) contains "no".

Best Answer

Suppose the dates are in column A, beginning with row 2, and cells to be formatted are in column B. Then you'd use conditional formatting with custom formula

=AND(A2<TODAY()+21, B2="no")

applying it to the range B2:B.