Conditional Format Formula help

pbt

Well-known Member
Joined
Oct 18, 2005
Messages
1,613
I can't seem to get this one.
vacation tracking LOG IWS 2006 TEST 1.xls
CDEFG
19/14/06
2
3
44/20/06
520-Apr-0620-May-0620-Jun-0620-Jul-0620-Aug-06
6   120
78
8
9112
7 YEAR EMPLOYEES


I am trying to Highlight (color) C9 if greater than 0, and only when Todays date is 30 days or less before date in G5.

I tried what I could think of but can't come up with something with the two criteria.

Thanks
h.h.
 

Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.
Thank you Very Much, Barry

That did it. This thing did not let me sleep last night

I have been up since 3:00 this morning searching for DATEDIF Not realizing it was short for Date Difference. (I was lookin for DATED and IF, duh)

Was just reading Chip Parsons site http://www.cpearson.com/excel/datedif.htmn
and trying to work it out when I received your post.

Not that I understand it all yet, but it works and I will study it to figure out what it is doing.

Thanks again,
Harry
 
Upvote 0
I started off thinking that you might want to format a future date, if they're always past dates you only need

=(C9>0)*(DATEDIF(G5,TODAY(),"ym")=0)

note: this highlights dates for a calendar month whereas, if you want 30 days switch to

=(C9>0)*(DATEDIF(G5,TODAY(),"yd")<=30)
 
Upvote 0
What I am trying to do is highlight an employees vacation hours 30 days before his anniversary date (month and day) to indicate that he will lose it if not taken. This is why I needed it to not look at the Year.

This formula also works
=(C9>0)*(DATEDIF(G5,TODAY(),"yd")<=30)

Thanks again, Barry
Harry
 
Upvote 0

Forum statistics

Threads
1,216,028
Messages
6,128,395
Members
449,446
Latest member
CodeCybear

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