If you want to highlight dates greater than or less than a certain date with conditional formatting, you can use a simple formula that relies on the date function. For example, if you have dates in the cells B4:G11, and want to highlight cells that contain a date greater than August 1st, 2015, select the range and create a new CF rule that uses this formula:
Note: it's important that CF formulas be entered relative to the "active cell" in the selection, which is assumed to be B4 in this case.
Once you save the rule, you'll see the dates greater than 8/1/2015 are highlighted.
How this formula works
The DATE function creates a proper Excel date with given year, month, and day values. Then, it's simply a matter of comparing each date in the range with the date created with DATE. The reference B4 is fully relative, so will update as the rule is applied to each cell in the range, and any dates greater than 8/1/2015 will be highlighted.
Greater than or equal to, etc.
Of course, you can use all of the standard operators in this formula to adjust behavior as needed. For example, to highlight all dates greater than or equal to 8/1/2015, use:
There is no need to hard-code the date into the rule. To make a more flexible, interactive rule, use another cell like a variable in the formula. For example, if you want to use cell C2 as an input cell, name cell C2 "input", enter a date, and use this formula:
Then change the date in cell C2 to anything you like and the conditional formatting rule will respond instantly.
If you want to highlight dates between two dates with conditional formatting, you can use a simple formula that uses the AND and DATE functions together. For example, if you have dates in the range B4:G11, and want to highlight cells that contain a...
The Excel DATE function creates a valid date from individual year, month, and day components. The DATE function is useful for assembling dates that need to change dynamically based on other values in a worksheet.
In this video, we look at how to make conditional formatting variable, so that you can change how formatting is applied without editing a rule. This elegant technique helps you build killer spreadsheets that are fun to use.
In this video, we use conditional formatting to create an interactive search box to highlight data. This is a nice alternative to filtering, because the information you're looking is highlighted in context, and the search box checks multiple...
In this Exceljet tip, we show you how to highlight entire rows in a list using conditional formatting with a formula. This is a handy way to visually expose information you are interested in without having to apply a filter. We also show you how to...
Formulas are the key to getting things done in Excel. In this accelerated training, you'll learn how to use formulas to manipulate text, work with dates and times, lookup values with VLOOKUP and INDEX & MATCH, count and sum with criteria, dynamically rank values, and create dynamic ranges. You'll also learn how to troubleshoot, trace errors, and fix problems. Instant access. See details here.