Forum Discussion
IF function based on dates in cell
Let's say your Date column is Column A and the data begin in row 2. Let's also figure your table spans columns A thru Z.
In "Conditional Formatting" (Home ribbon), add a New Rule and choose "Use a formula to determine which cells to format". For the formula, use:
=TODAY()-$A2 > {insert # days}
And apply the rule to the entire table (A2:Znn, where nn = last row with data). Note the '$' MUST be in front of the column with the dates and there must be NO $ in front of the row number (2 in this example). Then set the formatting of the conditional format as you like (e.g., pick a "fill" color).
... and if you really want to get fancy, instead of specifying the number of days in the formula, instead point to a cell somewhere else (better yet, a named range), and the highlights will change when the value in that cell changes:
= TODAY() - $A2 > TimeLimitWhere you've named a cell "TimeLimit". Changing the value of that cell from 7 to 14 will change from highlighting anything older than one week to anything older than two weeks, etc.