View Single Post
  #3   Report Post  
X_HOBBES
 
Posts: n/a
Default

Assuming the following:
- Column A = Name
- Column B = Hire Date
- Column C = Vacation Earned
- Column D = Days Taken
- Column E = Days Remaining
- Data starts on Row 2

Formulas are as follows:
- Vacation Earned (C2):
=IF(B2<"",IF(((NOW()-B2)/365.25)=15,20,IF(((NOW()-B2)/365.25)=7,15,IF(((NOW()-B2)/365.25)=2,10,0))),"")
- Days Remaining (E2): =C2-D2

Here's a quick breakdown of the formula... It's actually a bunch of
smaller formulas grouped into one large formula.

The formula to calculate the number of days worked is: NOW()-B2

Divide that by 365.25 days per year (accounting for leap year - kind
of) and you get this formula: (NOW()-B2)/365.25

Then there are a bunch of nested IF statements to see if the person has
been there 15 years or longer ( =15 ), 7 years or longer ( =7 ), or 2
years or longer ( =2 ).

I hope this helps!

X_HOBBES