A date in a cell greater than 10 days

Infine

Board Regular
Joined
Oct 16, 2019
Messages
71
Hello,

I try to put a condition:

I want if the date written in cell 02 is + 10 days I want to highlight it.

O2: 2021-12-28

Today it shall be colored.

If O2: 2021-01-07 I want it to be colored when we are in 2021-01-17


Anyone knows how I can do this? Google tell me: O2 < TODAY()-10 but this does not work... Especially as the value will be "2021-01-07" - 10 = 2020-12-28 which will highlight it.
 

Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.

Infine

Board Regular
Joined
Oct 16, 2019
Messages
71
Hello again,

The answer is: =$O2<=(TODAY()-10)

But I want an additional formula. I want that if "P2" is not empty, I want excel to ignore the rule above. Is this possible?
 

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
56,856
Office Version
  1. 365
Platform
  1. Windows
How about
Excel Formula:
=AND($P2="",$O2<=(TODAY()-10))
this will only colour the cell if P2 is empty, if it should only work if p2 is not empty change ="" to <>""
 
Solution

Infine

Board Regular
Joined
Oct 16, 2019
Messages
71
<> worked. Thank you. I used =AND($O2<=(TODAY()-10);$O2<>"";($P2=""))=TRUE
 

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
56,856
Office Version
  1. 365
Platform
  1. Windows
You're welcome & thanks for the feedback.
 

Watch MrExcel Video

Forum statistics

Threads
1,130,129
Messages
5,640,297
Members
417,135
Latest member
zeusmining

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
Top