Conditional formatting

geordieisdownunder

New Member
Joined
Aug 29, 2017
Messages
3
I am trying to set formatting for when a certificate is due to expire.
I have put a today formulae in one cell for current day.
In another cell I have an expiry date (there is multiple cells in the column each with different expiry dates)
I want either of these cells to highlight different colours for expired(red), 6 months to expiry(amber) and 6 months to expiry(green) and more than 6 months clear, no formatting just dates
Thanks in advance
Colin
 

Excel Facts

Fastest way to copy a worksheet?
Hold down the Ctrl key while dragging tab for Sheet1 to the right. Excel will make a copy of the worksheet.
highlight different colours for
expired(red), OK
6 months to expiry(amber) OK
and 6 months to expiry(green) That's the same as the one above, please clarify exactly what you want
and more than 6 months clear, OK
 
Upvote 0
You havent mentioned any cell references, so I will have to assume some things. This means you will have to adjust any solution given (specifically cell references) to match your actual spreadsheet.

A1=TODAY()
B1:B100 a list of expriy dates

Select B1:B100

Conditional Formatting
New Rule
Use a formula to determine...

=ISERR(DATEDIF(A$1,B1,"m"))
format as red

=DATEDIF(A$1,B1,"m")<6
format as green

=DATEDIF(A$1,B1,"m")<3
format as amber
 
Upvote 0
Hi, thank you for your help. I'm pretty poor using excel, trying to learn. The formulas you gave did not seem to work. Everything was highlighted in amber for some reason. I think I maybe need to reference the year of expiry too. the expiry I am looking at using in this sheet is 5 years.

I kinda mocked up a spreadsheet as below (don't think I can attach a sample) there would be about names on the list, probably increasing.
So when:
TODAY (D) is 6 months from expiry (E) format green
TODAY (D) is 3months from expiry (E) format amber
TODAY (D) is 6 beyond expiry (E) format red

More than 6 months no formatting

37ABCDEF
38NAMEOUTLETROLETODAY'S DATECERTIFICATION
EXPIRES
CERT. NUMBER
39colin1venue1chef130-08-1701-05-18123456
40joe2venue2waiter230-08-1701-05-18678910
41jane3venue3chef330-08-1730-08-20111213
42percy4venue4chef430-08-1714-08-22234532

<tbody>
</tbody>

6 months to expiration - green formatting
3 Months to expiration - amber formatting
past expiration date red formatting

<colgroup><col span="4"></colgroup><tbody>
</tbody>
more than 6 months no formatting

Thank you again


<colgroup><col><col><col span="7"></colgroup><tbody>
</tbody>
You havent mentioned any cell references, so I will have to assume some things. This means you will have to adjust any solution given (specifically cell references) to match your actual spreadsheet.

A1=TODAY()
B1:B100 a list of expriy dates

Select B1:B100

Conditional Formatting
New Rule
Use a formula to determine...

=ISERR(DATEDIF(A$1,B1,"m"))
format as red

=DATEDIF(A$1,B1,"m")<6
format as green

=DATEDIF(A$1,B1,"m")<3
format as amber
 
Upvote 0

Forum statistics

Threads
1,215,410
Messages
6,124,755
Members
449,187
Latest member
hermansoa

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