Conditional Formatting for Dates in Excel
We can highlight the values in excel by applying specific conditions with the help of “Conditional Formatting”. In this post we will focus on how we can apply Conditional Formatting on dates.
To use this command you have to select “A Date Occurring” option which is available under Conditional Formatting under Highlight Cells Rules.
Once you click on “A Date Occurring” one dialog box will open as shown in below image. As usual this dialog box allow us to provide 02 inputs
1. Condition
2. Formatting Style
We can provide 10 different types of conditions on selected dates and highlight these values with the formatting style of our own choice. All these 10 conditions are listed below. We will see then one by one in detail.
1. Yesterday
2. Today
3. Tomorrow
4. In Last 7 Days
5. Last Week
6. This Week
7. Next Week
8. Last Month
9. This Month
10. Next Month
Throughout this post we will consider today’s date as 7-June-2020. So all the highlighted values will depend on this date.
Highlighting Yesterday’s Date:
1. We have listed dates from 5-Jun-20 to 9-Jun-20. Select all the cells with this dates.
2. Go to Home Tab --) Select “Conditional Formatting” --) Select “Highlight Cells Rules” --) Select “A Date Occurring” --) Select “Yesterday” as a Condition and Formatting Style “Green Fill with Dark Green Text”. Click “OK”.
3. We can see that the yesterday’s date i.e. 6-Jun-20 is highlighted with Formatting Style “Green Fill with Dark Green Text”.
Highlighting Today’s Date:
1. We have listed dates from 5-Jun-20 to 9-Jun-20. Select all the cells with this dates.
2. and Go to Home Tab --) Select “Conditional Formatting” --) Select “Highlight Cells Rules” --) Select “A Date Occurring” --) Select “Today” as a Condition and Formatting Style “Green Fill with Dark Green Text”. Click “OK”.
3. We can see that the "Today’s date" i.e. 7-Jun-20 is highlighted with Formatting Style “Green Fill with Dark Green Text”.
Highlighting Tomorrow’s Date:
1. We have listed dates from 5-Jun-20 to 9-Jun-20. Select all the cells with this dates.
2. Go to Home Tab --) Select “Conditional Formatting” --) Select “Highlight Cells Rules” --) Select “A Date Occurring” --) Select “Tomorrow” as a Condition and Formatting Style “Green Fill with Dark Green Text”. Click “OK”.
3. We can see that the "Tomorrow’s date" i.e. 8-Jun-20 is highlighted with Formatting Style “Green Fill with Dark Green Text”.
Highlighting Dates from Last 7 Days:
1. We have listed dates from 28-May-20 to 10-Jun-20. Select all the cells with this dates.
2. Go to Home Tab --) Select “Conditional Formatting” --) Select “Highlight Cells Rules” --) Select “A Date Occurring” --) Select “In the last 7 days” as a Condition and Formatting Style “Green Fill with Dark Green Text”. Click “OK”.
3. We can see that dates from "last 7 days" are highlighted with Formatting Style “Green Fill with Dark Green Text”.
Highlighting Dates from Last Week:
1. We have listed dates from 28-May-20 to 10-Jun-20. Select all the cells with this dates.
2. Go to Home Tab --) Select “Conditional Formatting” --) Select “Highlight Cells Rules” --) Select “A Date Occurring” --) Select “Last Week” as a Condition and Formatting Style “Green Fill with Dark Green Text”. Click “OK”.
3. We can see that dates from "Last Week" are highlighted with Formatting Style “Green Fill with Dark Green Text”.
Highlighting Dates from This Week:
1. We have listed dates from 3-Jun-20 to 16-Jun-20. Select all the cells with this dates.
2. Go to Home Tab --) Select “Conditional Formatting” --) Select “Highlight Cells Rules” --) Select “A Date Occurring” --) Select “This Week” as a Condition and Formatting Style “Green Fill with Dark Green Text”. Click “OK”.
3. We can see that dates from “This Week” are highlighted with Formatting Style “Green Fill with Dark Green Text”.
Highlighting Dates from Next Week:
1. We have listed dates from 7-Jun-20 to 22-Jun-20. Select all the cells with this dates.
2. Go to Home Tab --) Select “Conditional Formatting” --) Select “Highlight Cells Rules” --) Select “A Date Occurring” --) Select “Next Week” as a Condition and Formatting Style “Green Fill with Dark Green Text”. Click “OK”.
3. We can see that dates from “Next Week” are highlighted with Formatting Style “Green Fill with Dark Green Text”.
Highlighting Dates from Last Month:
1. We have listed 1st date of each month from 1-Jan-20 to 1-Dec-20. Select all the cells with this dates.
2. Go to Home Tab --) Select “Conditional Formatting” --) Select “Highlight Cells Rules” --) Select “A Date Occurring” --) Select “Last Month” as a Condition and Formatting Style “Green Fill with Dark Green Text”. Click “OK”.
3. We can see that the date from the "Last Month" is highlighted with Formatting Style “Green Fill with Dark Green Text”.
Highlighting Dates from This Month:
1. We have listed 1st date of each month from 1-Jan-20 to 1-Dec-20. Select all the cells with this dates.
2. Go to Home Tab --) Select “Conditional Formatting” --) Select “Highlight Cells Rules” --) Select “A Date Occurring” --) Select “This Month” as a Condition and Formatting Style “Green Fill with Dark Green Text”. Click “OK”.
3. We can see that the date from the “This Month” is highlighted with Formatting Style “Green Fill with Dark Green Text”.
Highlighting Dates from Next Month:
1. We have listed 1st date of each month from 1-Jan-20 to 1-Dec-20. Select all the cells with this dates.
2. Go to Home Tab --) Select “Conditional Formatting” --) Select “Highlight Cells Rules” --) Select “A Date Occurring” --) Select “Next Month” as a Condition and Formatting Style “Green Fill with Dark Green Text”. Click “OK”.
3. We can see that the date from the “Next Month” is highlighted with Formatting Style “Green Fill with Dark Green Text”.
Comments
Post a Comment