Date - Conditional Formatting

ashani

Active Member
Joined
Mar 14, 2020
Messages
345
Office Version
  1. 365
Platform
  1. Windows
Hi everyone,
I wonder if someone could please guide me.

In my spreadsheet Column C14 - when user input the future date i.e. 01/01/2021 - if it's less than 6 months than it should turn Red.

Please can you help me.

Thanks
 

Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"
Let's get the ball rolling. Now if you have any questions let us know. Conditional format is very confusing and not much fun.

=YEARFRAC(NOW(),C14)<0.5


Book1
ABC
1
2
3
4
5
6
7
8
9
10
11
12
13
144/8/2021
Conditional
Cells with Conditional Formatting
CellConditionCell FormatStop If True
C14Expression=YEARFRAC(NOW(),C14)<0.5textNO
 
Upvote 0
Let's get the ball rolling. Now if you have any questions let us know. Conditional format is very confusing and not much fun.

=YEARFRAC(NOW(),C14)<0.5


Book1
ABC
1
2
3
4
5
6
7
8
9
10
11
12
13
144/8/2021
Conditional
Cells with Conditional Formatting
CellConditionCell FormatStop If True
C14Expression=YEARFRAC(NOW(),C14)<0.5textNO

Cool little formula! That's the first time I've seen YEARFRAC...
 
Upvote 0
You know Kev, I always wonder how everybody else come up with a solution to a problem. In this case I just looked thru Date and Time functions and there it was. It's not like I even use the year fraction all that often. But once I saw it, I knew I had to experiment with it and see if it would work for this problem. And it did work.
 
Upvote 0

Forum statistics

Threads
1,214,927
Messages
6,122,311
Members
449,080
Latest member
jmsotelo

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