Calculating Vacation and sick leave

New2excel

New Member
Joined
Jul 10, 2004
Messages
11
Hello Excel gurus! :biggrin:

I am new to Excel, but I can do simple functions and macros. I have been asked by my boss to create a simple spreadsheet that will calculate Vacation time and sick leave time as QuickBooks has been giving them trouble. I have searched the message boards but have not found what I need to do this. Or I have not understood how it is done. Any help will be greatly appreaciated.

Vacation is calculated by "date hired" anniversary dates:
First anniversary = 40 hours vacation time (automatic update on first anniversary date needed)
Second anniversary and every anniversary date thereafter = 80 hours vacation time (automatic update on each anniversary date needed)

This is the closest I can come to understanding the code to do this.
I'm not sure I am close to the right track :confused:
First somehow count the anniversary dates in D column then something like =IF(D6<1,D6,0)(D6=1,D6*40)(D6>1,D6*80) ???

Sick leave is calculated by number of pay periods times .92 hours
Pay periods are Thursday through Wednesday.
If employee starts in the middle of the pay period use previous Thursday as beginning first pay period
Update pay periods automatically by entering pay period end date in B2 or by using the TODAY() function
===========================
Here are the column headings I think I need after the entered "Pay Period End Date:" or use of the =Today() function.

Column Headings:
A) Employee Name:
B) Date Hired:
C) Number of Pay periods Worked:
D) Vacation Hours Accrued:
E) Sick Leave Hours Accrued:
F) Vacation Hours Used:
G) Sick Leave Hours Used:
H) Vacation Hours Balance:
I) Sick Leave Hours Balance:

I hope I have explained myself clearly......

P.S. Is there a good beginners book you would recommend?
Thanks again, for any help you can offer.
 

Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.
A great book for beginners is Mr. Excel on Excel. You can find it on this site. There are other good books, but I carry that one with me whenever I'm working on something.
 
Upvote 0
Hi, hello and welcome to MrExcel -- it's a bit slow around here on weekends, and I can't stay now, but I wanted you to know you're not being ignored and, if you've not gotten a solution by tomorrow I'll be back and give it a try.
 
Upvote 0
Thank you, Srburk. I will purchase Mr. Excel!

Thank you, Just_Jon, I appreciate your reply.

I'm off to purchase "Mr. Excel"!!
 
Upvote 0
Book1
ABCDEFGHIJ
1Pay& period end dateNameDOH# of pay periods workedVac hrs accruedSick leave hrs accruedVac hrs usedSick leave hours usedVac hrs balanceSick leave hrs balance
27/7/2004Employee A5/3/200021880200.5640840192.56
37/7/2004Employee B4/1/200414012.880804.88
47/7/2004Employee C7/1/2004100.920000.92
57/7/2004Employee D7/2/2004000080-8
67/7/2004Employee E7/1/2003534048.7616242424.76
77/7/2004Employee F7/1/20021058096.65327564.6
87/7/2004Employee G7/1/200115780144.4453075114.44
97/7/2004Employee H7/1/200020980192.2873173161.28
107/7/2004Employee I7/1/199926280241.0473273209.04
Sheet1


Formulas:
D2: =ABS(QUOTIENT(NETWORKDAYS(C2+(WEEKDAY(C2)>5)*7-WEEKDAY(C2)+5,A2),5))

E2: =MIN(80,40*(INT(D2/52)))

F2: =D2*0.92

I2: =E2-G2

J2: =F2-H2

All the formulas are just copied down the columns for as many employees as you have. This should be pretty close to what you asked for -- if something isn't quite right, please post back and I (or one of the gurus here) will attempt to fix the problem. Feel free to improve on what I've posted here -- I'm sure that first formula can be improved upon :)
 
Upvote 0
Thank you, Thank you, Thank you, Taz! :p

I will work on it at the office tomorrow, but it looks like you have it doing exactly what I needed.

I don't understand the code you used, so I can't wait to get my new book, "Mr. Excel On Excel".

Ever so grateful,
Suz
 
Upvote 0
Sorry about the green face..... I thought he was smiling, not sticking his tongue out.... :oops:

Phooey! Taz......... it doesn't work here at the office! We have Excel 97. Would that make a difference?

I made sure all my columns and rows matched yours and that I didn't have anything different, but all I get is #NAME?

??????
 
Upvote 0
Thanks, Dublinguy.

I did check the Add-Ins at work this afternoon and noticed that some were pre-checked: "Conditional Sum Wizard, Lookup Wizard, & Update Add-in links". Does this mean that these are the only ones not already added in?
If not, how can I tell what has already been added?

Dublin Ireland? My ancestors are from Ireland!
:)
 
Upvote 0
To install the Analysis ToolPak
On the Tools menu, click Add-Ins.
If Analysis ToolPak is not listed in the Add-Ins dialog box, click Browse and locate the drive, folder name, and file name for the Analysis ToolPak add-in, Analys32.xll — usually located in the Microsoft Office\Office\Library\Analysis folder — or run the Setup program if it isn't installed.

Select the Analysis ToolPak check box.
 
Upvote 0

Forum statistics

Threads
1,215,335
Messages
6,124,327
Members
449,155
Latest member
ravioli44

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