Cell to change colour when a date is about to expire

Sharr76

New Member
Joined
Nov 21, 2009
Messages
14
Hi all,

I have tried my best and I just cant get this to work:

How would I get a white cell with a date in it to change colour, e.g. to orange when the date is about to expire, so I would like cells to change to orange when a date is due to expire in 12 weeks time, 84 days.

Capture trn.JPG
 

Excel Facts

Whats the difference between CONCAT and CONCATENATE?
The newer CONCAT function can reference a range of cells. =CONCATENATE(A1,A2,A3,A4,A5) becomes =CONCAT(A1:A5)
conditional formatting

As today is 19/may/21 - then due to expire in 84 days time = 11th Aug 21
so any date earlier than 11th Aug 21 to the past will highlight

=today() + 84
that adds 84 days to todays date

then if cell < = today() + 84
is a formula that will give use dates from the past upto 84 days in future

not sure what range the dates are in
assume B2 to z200

for 2007, 2010 , 2013 , 2016 , 2019 or 365 Subscription excel version
Conditional Formatting

Highlight applicable range >>

B2 to Z200



Home Tab >> Styles >> Conditional Formatting
New Rule >> Use a formula to determine which cells to format
Edit the Rule Description: Format values where this formula is true:


AND( B2<>"", B2 < = today() + 84)


Format [Number, Font, Border, Fill]
choose the format you would like to apply when the condition is true
OK >> OK

The AND is to stop Blank cells highlighting

chemistry_v1.xlsx
BCDEFGH
2
38/11/21
48/13/21
58/15/21
65/19/21
7
85/31/21
9
10
11
12
Sheet9
Cell Formulas
RangeFormula
C3C3=TODAY()+84
E4E4=TODAY()+86
G5G5=TODAY()+88
C6C6=TODAY()
E8E8=TODAY()+12
Cells with Conditional Formatting
CellConditionCell FormatStop If True
B2:M12Expression=AND(B2<>"",B2<=TODAY()+84)textNO
 
Upvote 0
Hi, what am I doing wrong? I still cant get this to work?
 

Attachments

  • Capture trn 1.JPG
    Capture trn 1.JPG
    99 KB · Views: 22
Upvote 0
its put inverted commas around the formula and on the ""

="AND( B2<>"""", B2 < = today() + 84)" - those extra "" needs removing, edit the formula ad remove the RED "

to become

=AND( B2<>"", B2 < = today() + 84)
 
Upvote 0

Forum statistics

Threads
1,214,583
Messages
6,120,383
Members
448,955
Latest member
BatCoder

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