Dec 28 2017
06:45 AM
- last edited on
Jul 25 2018
10:38 AM
by
TechCommunityAP
Dec 28 2017
06:45 AM
- last edited on
Jul 25 2018
10:38 AM
by
TechCommunityAP
I have a spreadsheet for work where there are dates (all different). I need to create a rule/s in conditional formatting so it highlights red when its due. Some are due every 2, 3 or four years.
I have the rule for yearly which is =NOW()
But i don`t know how to flag it when its every 2, 3 or four years.
05/10/2017 |
02/08/2014 |
26/05/2018 |
21/02/2017 |
Dec 28 2017 07:09 PM
Dec 29 2017 08:31 AM
I would like it to highlight the cell red.
Example...if the date in the cell was 01/02/2014 and it was expired date say 3 years it would highlight red.
if that makes sense
Dec 29 2017 04:52 PM
You may try this
=AND(DATEDIF($A1,NOW(),"y"),NOW())>=1,DATEDIF($A1,NOW(),"y"),NOW())<=4)
DATEDIF function can be found:
Jan 02 2018 07:14 AM
HI thanks for all your help. Unfortunately its still not working.
I can get it to highlight when it has expired after a year using =NOW()
But i cannot get it to do the same for 2 years, 3 and four
Jan 02 2018 10:43 AM
The rule Willy gave returns TRUE if from now to start date is more than one year and less than four, and FALSE for any other dates.
If different rules (for 1,2,3 and 4 years accordingly) or number of years is set as a value (<n>) when it could be
=INT(YEARFRAC(A1,TODAY(),1)) = <n>
Jan 03 2018 06:48 AM
Thank you how would i input this, i`ve tried conditional formatting -- New rule -- Use a formula to determine which cells to format.
or is there another way?
I would like to say thank you for everyone's help
Jan 03 2018 08:09 AM
Hi Russell,
Yes, new rule->use a formula, the only point is to use correctly absolute and relative references in formula. If you apply the rule to the column use like $A1, if to the row like A$1, etc.
Jan 03 2018 08:39 AM
Jan 03 2018 09:40 AM
Russel,
Not sure what is E24, let say your dates are in column A and you apply the rule (red) for due date over 2 years
and the same for 1 year (=1) in yellow, applying to your range
Using $A1 in the rule means you compare each cell in column A applying it to you range.
If you expand your range and apply it to expanded range still compare $A1 rules highlight entire row in the range
Jan 03 2018 09:47 AM
Jan 03 2018 10:33 AM
Russel, formula is the same if i understood you correctly
for today only first date is highlighted since it's 2 years over.
Jan 09 2018 01:23 AM
Thank you.
How would i wright it for individual boxes and just compare it to today's date?