## Highlight dates in a date range

*Article last updated on December 22, 2017*

**Question**: How do I highlight dates that meet criteria using conditional formatting?

**Table of contents**

### Highlight values in a column

**How to apply the conditional formatting formula in excel 2007:**

- Select the range (A1:A10)
- Click "Home" tab on the ribbon
- Click "Conditional formatting"
- Click "New rule..."
- Click "Use a formula to determine which cells to format"
- Click "Format values where this formual is true" window.
- Type
=(A1<=$D$2)*(A1>=$D$1)
- Click Format button
- Click "Fill" tab
- Select a color
- Click OK!
- Click OK!

### Highlight values in a row

Conditional formatting formula in cell range A5:E5:

### Highlight records

Conditional formatting formula in cell range A6:C15:

### Sort values

You can quickly sort highlighted records to the top of the list.

- Select cell range A6:C15
- Right click on cell range
- Click "sort"
- Click "Put selected cell color on top"

All highlighted records are on top.

**Download excel *.xls fil****e**

highlight-dates-in-range-using-conditional-formatting2.xls

(Excel 97-2003 Workbook *.xls)

Counting conditionally formatted cells (vba)

UPDATE: It is not possible to count conditionally formatted cells using vba as far as I know, I recommend you […]

Geoff asks: Hi Oscar, I have a cross reference table we use for shift scheduling. The x-axis is comprised of […]

This post decribes how to highlight records with closest value to a criterion. You can also choose to highlight the […]

This blog post shows you how to easily identify duplicate rows or records in a list. Conditional formatting formula: =COUNTIFS($B$3:$B$15, […]

How to highlight MAX and MIN value based on month

Conditional formatting formula to highlight max value in every month: =B2=MAX(IF(MONTH(A2)=MONTH(Date_rng), Close, "")) Conditional formatting formula to highlight min value […]

Here is how to highlight every other row using conditional formatting. Conditional formatting formula: =ISEVEN(ROW())*OR($B3:$D3<>"") Alternative CF formula: =EVEN(ROW())=ROW() This […]

Question: I have a list that I keep adding rows to. How do i create a border that expands as […]

Highlight records – multiple criteria [OR logic]

This blog post shows you how to highlight rows with multiple criteria using OR logic. The criteria is found in […]

Highlight duplicates in a filtered Excel defined table

You can highlight duplicates in an excel defined table using conditional formatting. However, that won´t work if you only want […]

### 15 Responses to “Highlight dates in a date range”

### Leave a Reply

### How to comment

**How to add a formula to your comment**

<code>Insert your formula here.</code>

**Convert less than and larger than signs**

Use html character entities instead of less than and larger than signs.

< becomes < and > becomes >

**How to add VBA code to your comment**

[vb 1="vbnet" language=","]

Put your VBA code here.

[/vb]

**How to add a picture to your comment:**

Upload picture to postimage.org or imgur

Use the img tag, like this: <img src="Insert pic link here">

**Contact Oscar**

You can contact me through this contact form

I'd like to do this for a row instead of a column, but I'm stuck. (I replace 'A1' with '1:01'.) Can this be done?

Kate,

I have have added more content, I hope it will answer your question.

i am trying to do a conditional formatting for a calendar row. (essentially, a gant chart)

i have a schedule table with event in 1st column, start date in 2nd column, end date in 3rd column, and a 2-criteria condition for the event in the 4th column.

how do i condition format the cell row beneath the calendar row so that they are within the start/end date and will be color coded brown or blue based on the 2-criteria? I already have a conditional formatting done for weekends and holidays for the calendar row itself, so hence the new row beneath.

bryan,

Can you provide example data and desired outcome?

Oscar,

Thank you for the reply. Further info provided:

I have a schedule table with 4 columns.

1. Column D has the event name

2. Column E has the Start date

3. Column F has the End date

4. Column G has a drop-down choice of "home" or "out of area"

I have a calendar going from I1:IV1. I have it setup for highlighting federal holidays and weekends for conditional formatting.

I have a row setup beneath the calendar from I3:IV3 that I'd like to conditionally format to reflect based on the start-end date ranges in the schedule table with color coding for "home" or "out of area".

Thank you.

bryan,

Read this: Highlight events overlapping federal holidays

[...] Bryan asks: [...]

Hi

Regarding your section on 'HIGHLIGHT RECORDS', how do I Conditional Format to highlight dates in range that are recognised, but then automatically highlight all cells in the row?

IE: Using your HIGHLIGHT RECORDS example:

Conditional Format (as per your formulae provided) to recognises dates between 10-01-2009 & 20-01-2009

Then automatically highlight COUNTRY & COMPANY once dates recognised by Conditional Formatting.

John-Paul

I don´t understand.

The "Highlight records" example highlights all cells (also country and company) in a row?

Can you explain in greater detail?

Hi,

I am making a Schedule of Project in Excel, Where i am taking 2 column as Start date and End date. While I need that whenever i enters the start date and end date , according to that rows color changes simultaneously..... While after End date column, Next all columns belongs to week wise column. so every cell color changes accordingly with respect to weekwise.

Please let me know how to set a format like this....

Thru which color changes automatically, whenever i enters dates.

Avin

Avin,

I am not following, can you please take a screenshot of your sheet and the desired outcome. Upload to postimage.org. Then add the picture link to your comment.

I've tried the above method but only two of my dates actually got highlighted. Is there and issue in Excel 2010?

I have dates in two particular cells and I need a row of dates to highlight a particular color if the dates fall on or between the particular dates. I think the formula for rows above should work but it is not.

Jen

Jen,

I've tried the above method but only two of my dates actually got highlighted. Is there and issue in Excel 2010?No, it works in excel 2010.

Is there an issue on the attached file? The attached file works here (excel 2010).

Can you provide your Conditional Formatting formula?

Did you check the absolute and relative cell refs in your CF formula?

Here is a pdf of what I'm talking aobut. I've applied the conditional formatting, but the cells that are white (Y7 to AM7) *should* be green.

https://s26.postimg.org/p77hmqeuh/Page_1_Conditional_Formatting_Sample.jpg

Jen,

your CF formula should be:

=(Y7>=$I$7)*(Y7< =$J$7) not =(Y7<=$I$7)*(Y7>=$J$7)