Conditional Formatting using dates

mattbird

Active Member
Joined
Oct 15, 2013
Messages
305
Office Version
  1. 2016
Hi,I am trying conditional formal a cell with a date working of another date.in Cell E6 I have entered a start date and in Cell H6 a review date. I would like cell H6 to show green if within 6 weeks of the start, orange if between 6-12 weeks and red if over 12 weeks.I am currently using Excel 2016.Great full for any helpMatt
 

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.
Select H6

Conditional Formatting
New Rule
Use a formula to determine...
3 rules, in this order

=AND(H6>0,H6<=C6+84)
format as orange

=AND(H6>0,H6<=C6+42)
format as green

=AND(H6>0,H6>C6+84)
format as red
 
Upvote 0
The order of the rules actually won't matter if you define/narrow the ranges a little better, so that there is not overlap between then (i.e. between 42 and 84, etc).
Which date is the larger date, the one in E6 or the one in H6?
Are they both always populated?
 
Upvote 0
E
F
G
H
I
5
Start dateReview date
6
1/1/2018​
1/30/2018​
7
12/3/2018​
2/2/2019​
8
2/14/2018​
6/9/2018​
9
3/19/2018​
5/30/2018​
10
Sheet: Sheet34

Green CF formula applied to cell range H6:H9:
=(H6-E6)<=42

Orange CF formula applied to cell range H6:H9:
=((H6-E6)>42)*((H6-E6)<=84)

Red CF formula applied to cell range H6:H9:
=(H6-E6)>84
 
Upvote 0
Hi, Thanks for every ones help.

Special K99: When I entered the dates it would not show green only orange or red ie 7 May 18 to 18 Jun 18 should stay green, 19 Jun 18 to 30 Jul 18 orange and 31 Jul onwards red, But your formula was orange from the 7 May 18 - 30 Jul 18 and then turned red on the 31 Jul 18 onwards.

Oscar Cronquist: Your formulas worked just fine.

Joe4: In answer to your question the date in Cell H6 is larger and both should be populated.

Thanks again for your help and fast response.

Matt
 
Upvote 0

Forum statistics

Threads
1,215,387
Messages
6,124,637
Members
449,177
Latest member
Sousanna Aristiadou

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top