Expiration Date in Excel Coloring

huja

New Member
Joined
Jan 9, 2022
Messages
7
Office Version
  1. 2021
Platform
  1. Windows
Hi.

I'm new to this forum and english is not native language so bear with me.

I really try to figure out an easy way in excel to show me when a deadline is approaching.

So let's say I have a deadline 2022-01-31, and I type 2022-01-31 in a cell.
I want excel to turn the cell red when it reaches 2022-01-31 and keep showing red after 2022-01-31.
I also want excel to turn the cell yellow when it is 14 days left until deadline.
When it is more than 14 days left I want the cell to be green.

How do I do this in Excel? I have searched everywhere and I fail every time.

I know I can use "conditional formatting" but I do not know what formula to apply to make it work.

Thanks in advance.
 

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.
Hi Huja,

I believe this is what you want. You can ignore columns E, F and G but because getting the formulae correct can be tricky I'm showing you how I test the formulae before putting them in a Conditional Format.

Huja.xlsx
ABCDEFG
1DateDeadlineRedYellowGreen
231-Jan-2231-Jan-22TRUEFALSEFALSE
317-Jan-22FALSETRUEFALSE
416-Jan-22FALSEFALSETRUE
501-Feb-22TRUEFALSEFALSE
630-Jan-22FALSETRUEFALSE
701-Jan-21FALSEFALSETRUE
801-Jan-23TRUEFALSEFALSE
9
Sheet1
Cell Formulas
RangeFormula
E2:E8E2=$A2>=$C$2
F2:F8F2=AND($A2<$C$2,$A2+14>=$C$2)
G2:G8G2=AND($A2<>"",$A2+14<$C$2)
Cells with Conditional Formatting
CellConditionCell FormatStop If True
A2:A20Expression=AND($A2<>"",$A2+14<$C$2)textNO
A2:A20Expression=AND($A2<$C$2,$A2+14>=$C$2)textNO
A2:A20Expression=$A2>=$C$2textNO
 
Upvote 0
Hi.

Thanks for the help.

Not really like this.
I wish to use the "today()" formula somehow. So when a the deadline date is closing in it will change color, based on how close to the date it is.
When today() has reached the deadline, and past deadline, it will change to red.
When today() is within 14 days (when it is 14 days left) it will change to yellow.
When today() has not reached 14 days (When it is more than 14 days left) I want it to be green.

Hope you understand what I mean.

Thanks in advance
 
Upvote 0
Hi & welcome to MrExcel.

What cells are your dates in?
 
Upvote 0
Going down col A or across row 2?
 
Upvote 0
2nd attempt

Huja.xlsx
A
1Date
231-Jan-22
315-Jan-22
424-Jan-22
525-Jan-22
610-Jan-22
701-Jan-22
801-Jan-23
9
10
2nd
Cells with Conditional Formatting
CellConditionCell FormatStop If True
A2:A20Expression=$A2>TODAY()+14textNO
A2:A20Expression=AND($A2>TODAY(),$A2<=TODAY()+14)textNO
A2:A20Expression=AND($A2<>"",$A2<=TODAY())textNO
 
Upvote 0
Hi.

I want exactly like this... but reverse. I tried to change it to -14 but it did not work. How can I reverse it?
I don't understand what you mean by revere it.

Here's a list of dates which should cover all scenarios. Please identify the colour required for each:

Huja.xlsx
JKL
1Row 1DateDays from TODAY()
2Row 220-Dec-21-22
3Row 327-Dec-21-15
4Row 428-Dec-21-14
5Row 529-Dec-21-13
6Row 610-Jan-22-1
7Row 711-Jan-220
8Row 812-Jan-221
9Row 924-Jan-2213
10Row 1025-Jan-2214
11Row 1126-Jan-2215
12Row 1202-Feb-2222
2nd
 
Upvote 0

Forum statistics

Threads
1,214,625
Messages
6,120,598
Members
448,973
Latest member
ksonnia

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