Dinners

Conditional Formatting Using Dates in Spreadsheets

Updated · By Stir & Share

Total timeprep + cook
5 min
Prep
5 min
hands-on
Cook
No cooking
no heat needed
Serves
1
as written

Save

Conditional formatting using dates relies on logical comparisons between a cell value and a reference date, such as today’s date. This tool automatically changes the color of a cell to signal deadlines, overdue payments, or upcoming events. It transforms a static list of dates into a visual dashboard for tracking time-sensitive tasks.

Date Formula Ingredients

  • 1 range of cells containing valid date formats (e.g., MM/DD/YYYY)
  • 1 reference date (typically the TODAY() function)
  • 1 logical operator (such as <, >, or =)
  • 1 chosen format style (fill color, font color, or border)
  • 1 rule priority order (determines which color wins if multiple rules apply)

Instructions for Date Formatting

  1. Select the range of cells containing the dates you want to format, such as A2:A100.
  2. Navigate to the Home tab > Conditional Formatting > New Rule. Labels may differ slightly by software version.
  3. Select the option “Use a formula to determine which cells to format” from the rule type list.
  4. Enter the formula for overdue dates: =A2<TODAY(). Replace A2 with the top-left cell of your selected range.
  5. Click the Format button, choose a red fill color, and click OK to apply the rule.
  6. Repeat the process for upcoming dates by selecting New Rule again.
  7. Enter the formula for dates occurring in the next 7 days: =AND(A2>=TODAY(), A2<=TODAY()+7).
  8. Click the Format button, choose a yellow fill color, and click OK.
  9. Navigate to Conditional Formatting > Manage Rules to ensure the “Upcoming” rule is listed above the “Overdue” rule if they overlap.

Why Date Formatting Fails or Looks Wrong

Dates are stored as text

If a date is entered as text rather than a date serial number, the formula will not recognize it. This causes cells to remain uncolored even when they meet the date criteria. To fix this, select the column and change the number format to Date. If the dates do not shift alignment, use the “Text to Columns” tool to convert them to proper date values.

Incorrect cell referencing

Using an absolute reference (like $A$2) instead of a relative reference (A2) in the formula applies the logic of one single cell to the entire range. This results in every cell in the range turning the same color based on the status of A2. Remove the dollar signs from the cell reference to allow the formula to evaluate each row individually.

Conflicting rule priorities

When a date meets two different criteria, the software applies the rule at the top of the list. If your “Any date in the future” rule is above your “Due tomorrow” rule, the cell will show the general future color instead of the urgent tomorrow color. Move the most specific or urgent rules to the top of the Manage Rules list.

Date Logic Substitutions

  • TODAY() to a fixed date: Swap TODAY() for a specific cell reference like $B$1. This allows you to change the reference date in one cell to update the entire sheet.
  • 7 days to 30 days: Change TODAY()+7 to TODAY()+30. This expands the highlight window from a weekly view to a monthly view.
  • < to <= : Use <= instead of < to include the current day in the “Overdue” or “Due” category.
  • AND() to OR(): Swap AND for OR if you want to highlight cells that meet either of two date conditions rather than both.

Date Formatting Logic Examples

Highlighting the Current Month

To highlight every date that falls within the current calendar month regardless of the year, use the formula =MONTH(A2)=MONTH(TODAY()). This is useful for monthly reporting where you need to isolate current activity from previous months. Note that this will also highlight the same month from previous years unless you add a year check: =AND(MONTH(A2)=MONTH(TODAY()), YEAR(A2)=YEAR(TODAY())).

Identifying Expired Dates

For tracking subscriptions or certifications, use =A2<TODAY(). This identifies any date that has already passed. To create a warning system, combine this with a secondary rule for =A2-TODAY()<30 to highlight items expiring within 30 days. This gives a 30-day lead time before the item turns the “Expired” color.

Calculating Business Days

Standard date addition (TODAY()+7) includes weekends. To highlight dates based on business days, use the WORKDAY function. For example, =A2<=WORKDAY(TODAY(), 5) will highlight dates within the next 5 working days. This prevents weekends from skewing your urgency markers in professional project trackers.

Handling Blank Cells

Blank cells are often treated as zero by spreadsheet software, which the system interprets as a date in the year 1900. This causes all empty cells to turn red under an “Overdue” rule. To prevent this, wrap your formula in an AND function to ignore blanks: =AND(A2<>"", A2<TODAY()). This ensures only cells with actual date entries are formatted.

Related

Safe minimum internal temperatures follow USDA FSIS; raw-fish guidance follows the U.S. FDA. See our food safety notes.

Spotted an error? Tell us and we will correct it (corrections policy).