![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
New Member
Join Date: Feb 2002
Location: Japan
Posts: 2
|
I maintain a large list of people and track training dates. My problem is that I need a way to conditionally format cells so that when these dates turn a year old, they highlight.
ex. Supervisor Safety - Completed 12Jan01 I need this date highlighted since it is more than a year old...... PLEASE HELP!!!! This is driving me nutz! |
|
|
|
|
|
#2 |
|
MrExcel MVP
Join Date: Feb 2002
Location: San Francisco, California USA
Posts: 10,382
|
Let's say your list starts in cell A2; follow these steps:
(1) Select A2. (2) Click on Format > Conditional Formatting. (3) Under the script Condition 1, click the down arrow and select "Formula Is". (4) In the field to the right, enter (or paste in) this formula: =A2-DATE(YEAR(TODAY())-1,MONTH(TODAY()),DAY(TODAY()))<=0 (5) Click the Format... button, and choose your formatting preferences. (6) Click OK, then OK. (7) Copy A2 and paste special for Formats as far down as you need to. Tom Urtis |
|
|
|
|
|
#3 |
|
Guest
Posts: n/a
|
=Now()-A2>365.25 should also work.
|
|
|
|
#4 |
|
MrExcel MVP
Join Date: Feb 2002
Location: San Francisco, California USA
Posts: 10,382
|
That it will, plus it's *just a few* characters shorter than mine.
Thanks. T.U. |
|
|
|
|
|
#5 |
|
Board Regular
Join Date: Feb 2002
Posts: 7,743
|
Anon or Tom
I've tried using this with 11 months but no luck. I reduced 365.25 to 335.25 and get a "false" response. Brian |
|
|
|
|
|
#6 |
|
Board Regular
Join Date: Feb 2002
Posts: 7,743
|
Guys,
I got it. Using the wrong <>!!! Brian |
|
|
|
|
|
#7 |
|
New Member
Join Date: Feb 2002
Location: Japan
Posts: 2
|
You guys are great!!! If you ever come to Okinawa, the beer is on me!
Got one last question... what is the .25 on the end of 365 for? Thanks Rob |
|
|
|
|
|
#8 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Bogota, Colombia
Posts: 11,927
|
A year doesn't have exactly 365 days, that's why every 4 years we have a Feb 29th, it's just a way of adding the 1/4 of a day that each year has.
|
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|