I currently have this formula for a vacation accrual spreadsheet. How would you make it show a negative number if he has used more than he has available?
=IF(L251+N251+O251-SUM(P251:AA251)<0,0,(L251+N251+O251-SUM(P251:AA251)))
I currently have this formula for a vacation accrual spreadsheet. How would you make it show a negative number if he has used more than he has available?
=IF(L251+N251+O251-SUM(P251:AA251)<0,0,(L251+N251+O251-SUM(P251:AA251)))
Just guessing without seeing what's in these cells but remove the IF statement
=L251+N251+O251-SUM(P251:AA251)
Does that work?
ChemistB
My 2?
substitute commas with semi-colons if your region settings requires
Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)
Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble
l251, n251 and 0251 are just days availabe from last year, earned this year and next yer. and p-aa are the months. I tried the formula but it does not come out right.
Say an employee has 15 days available for vacation, he took 16 days, it is suppose to be -1 but comes out to 0.
Okay, so
L251 + N251 + O251 are the total days the employee has accumulated (although not sure why next year is in there?)
P251:AA251 are vacation days taken?
next year is in there because they are allowed to use days they accumulate after their date of hire anniversary.
so his date of hire is jan 10th, 2011, after that date it was have bee about 7 months so he gets 7 months worth of the years vacation. So 7divide 12 is about 58% so 58% of 15 available days is about 9 days. So he has 9 days for next years vacation that he can use this year.
To best describe or illustrate your problem you would be better off attaching a dummy workbook, the workbook should contain the same structure and some dummy data of the same type as the type you have in your real workbook - so, if a cell contains numbers & letters in this format abc-123 then that should be reflected in the dummy workbook.
If needed supply a before and after sheet in the workbook so the person helping you can see what you are trying to achieve.
Doing this will ensure you get the result you need!
So this is what is looks like, The first person should have a negative amount of days because he took too many vacation days instead of it showing 0
In E6 dragged/copied down
=K6+M6+N6-SUM(O6:Z6)
(which is what I recommended in my first post)
Does that work for you?
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks