Hoping someone can figure out what it going on with this formula! I'm trying to create a formula that will automatically calculate an employees vacation balance based on three variable:
- The employees start date relative to the date the entry is made
- The accrual of .8333 days per month (10 days off per year divided by 12 months)
- The subtraction of any PTO that is accounted for in column E of the spreadsheet
The formula in column G almost works but it is adding time at slightly increasing increments as the formula is applied to future entries. To be more specific: in cell G6 it adds 1, in cell G7 approximately 1.2 and up and up...
Formula currently looks like this:
=IF((YEAR(D6)-YEAR(D5))*12+MONTH(D6)-MONTH(D5)>0,(G5+((YEAR(D6)-YEAR(D5))*12+MONTH(D6)-MONTH(D5)*10/12))-E6,(G5-E6))
Spreadsheet is attached but to map the fields:
D6 = Date of entry
D5 = Date of previous entry
G5 = Previous balance (in days)
E6 = Number of days to be subtracted from employee vacation balance
Totally stumped and any help is appreciated!
Bookmarks