J
jprogrammer
I have inherited a spreadsheet that accrues vacation time. However I'm
not sure if it works PROPERLY plus I don't understand it at all. Any
changes or advice would be very helpful! Here is ALL the criteria of
what the spreadsheet represents:
Column 1 Formula (1 month-9 Years):
Code:
--------------------
=IF(AND(DAY(TODAY())>=DAY(E6),YEAR(TODAY())=YEAR(E6)),(MONTH(TODAY())-MONTH(E6))*3.34,IF(AND(DAY(TODAY())<DAY(E6),YEAR(TODAY())=YEAR(E6)),(MONTH(TODAY())-(MONTH(E6)+1))*3.34,IF(AND(YEAR(TODAY()>YEAR(E6)),(YEAR(TODAY())-YEAR(E6)<10),DAY(TODAY())>=DAY(E6)),(((MONTH(TODAY()))*(80/12))+((12-MONTH(E6))*3.34)+((YEAR(TODAY())-(YEAR(E6)+1))*80)),IF(AND(YEAR(TODAY()>YEAR(E6)),(YEAR(TODAY())-YEAR(E6)<10),DAY(TODAY())<DAY(E6)),(((MONTH(TODAY())-1)*(80/12))+((12-MONTH(E6))*3.34)+((YEAR(TODAY())-(YEAR(E6)+1))*40)),"N/A"))))
--------------------
Column 2 Formula (>=10 Years):
Code:
--------------------
=IF(AND((YEAR(TODAY())-YEAR(E6)>=10),DAY(TODAY())>=DAY(E6)),(((MONTH(TODAY()))*(10))+((12-MONTH(E6))*6.67)+((YEAR(TODAY())-(YEAR(E6)+10))*80)+720),IF(AND((YEAR(TODAY())-YEAR(E6)>=10),DAY(TODAY())<DAY(E6)),(((MONTH(TODAY())-1)*(10))+((12-MONTH(E6))*6.67)+((YEAR(TODAY())-(YEAR(E6)+10))*80)+720),"N/A"))
--------------------
Column 3 Formula (Converts Column 1 OR 2 into 40 OR 80 hours):
Code:
--------------------
=IF(S6<=40,S6,IF(S6="N/A",80,IF(S6>40,40,"???")))
--------------------
I hope I haven't confused everyone! This is hard for me to follow much
less trying to explain to others.
Thanks for taking a look at this!
not sure if it works PROPERLY plus I don't understand it at all. Any
changes or advice would be very helpful! Here is ALL the criteria of
what the spreadsheet represents:
code:*During first calendar year vacation will accrue at 3.34 hours per
completed month of service. (40.08 hours)
*Beginning January 1 of the 10th calendar year vacation will accrue at
6.67 hours per completed month of service. (80.04 hours)
I have 3 columns set up:
*Column 1 holds the formula for employees who have been here 1 month-9
years.
*Column 2 holds the formula for employees who have been here >=10
Years.
*Column 3 holds the following formula which converts either column 1 or
column 2 into 40 or 80 hours depending on which the employee qualifies.
Column 1 Formula (1 month-9 Years):
Code:
--------------------
=IF(AND(DAY(TODAY())>=DAY(E6),YEAR(TODAY())=YEAR(E6)),(MONTH(TODAY())-MONTH(E6))*3.34,IF(AND(DAY(TODAY())<DAY(E6),YEAR(TODAY())=YEAR(E6)),(MONTH(TODAY())-(MONTH(E6)+1))*3.34,IF(AND(YEAR(TODAY()>YEAR(E6)),(YEAR(TODAY())-YEAR(E6)<10),DAY(TODAY())>=DAY(E6)),(((MONTH(TODAY()))*(80/12))+((12-MONTH(E6))*3.34)+((YEAR(TODAY())-(YEAR(E6)+1))*80)),IF(AND(YEAR(TODAY()>YEAR(E6)),(YEAR(TODAY())-YEAR(E6)<10),DAY(TODAY())<DAY(E6)),(((MONTH(TODAY())-1)*(80/12))+((12-MONTH(E6))*3.34)+((YEAR(TODAY())-(YEAR(E6)+1))*40)),"N/A"))))
--------------------
Column 2 Formula (>=10 Years):
Code:
--------------------
=IF(AND((YEAR(TODAY())-YEAR(E6)>=10),DAY(TODAY())>=DAY(E6)),(((MONTH(TODAY()))*(10))+((12-MONTH(E6))*6.67)+((YEAR(TODAY())-(YEAR(E6)+10))*80)+720),IF(AND((YEAR(TODAY())-YEAR(E6)>=10),DAY(TODAY())<DAY(E6)),(((MONTH(TODAY())-1)*(10))+((12-MONTH(E6))*6.67)+((YEAR(TODAY())-(YEAR(E6)+10))*80)+720),"N/A"))
--------------------
Column 3 Formula (Converts Column 1 OR 2 into 40 OR 80 hours):
Code:
--------------------
=IF(S6<=40,S6,IF(S6="N/A",80,IF(S6>40,40,"???")))
--------------------
I hope I haven't confused everyone! This is hard for me to follow much
less trying to explain to others.
Thanks for taking a look at this!