Creating a Semi-Monthly Payroll Calendar

dvanallen

New Member
Joined
Dec 5, 2014
Messages
12
I'm trying to create a semi-monthly payroll calendar that takes into account holidays and Sundays. Payroll has to be submitted to the processor X days before the pay date. If the pay date (or any day between it and the payroll submission date) is a holiday or Sunday, it can't be included in the calculation for X days.

The columns I my spreadsheet are:
A|B|C|D
Begin Date|End Date|Cut-off Date|Pay Date

Here's my current formula, which is placed in column D, the "Pay Date" column.

=IF(AND(WEEKDAY(B27+1,2)<7,ISNA(MATCH(B27+1,Holidays,0)))=FALSE,WORKDAY(B27,-1,'Holidays'!$V$4:$V$13),"false")

  • Column B is the Ending Date column. B27 is the ending date of the previous payroll period: Sunday, December 31, 2017
  • Holidays is a built-in Excel holiday library
  • 'Holidays'!$V$4:$V$13 is a named range containing my own list of holiday dates

Pay dates are on the 1st and 15th of the month. The formula should recognize that 1st is a holiday (1/1/18) and revise the pay date to be one non-holiday, business day before the 1st. That would be December 30th.

As the formula is written above, it returns the date of 12/29/17. That's one day too early.
If I change the -1 at the end of the formula to 0, then the formula changes to 12/31 (which is a Sunday). Paychecks can't be received on Sundays.

Please help!
 
I wish I could just post an attachment of my file instead of recreating it! :)

Here's what I have so far:


ABCDE
1Begin DateEnd DateHourly Employees
Time Card Deadline
Employee Payroll
Cut-off Date
Pay Date
21/1/2015=A2+14=WORKDAY.INTL(B2+1,-1,11,Holidays)
3=A2+15=EOMONTH(A5,0)=WORKDAY.INTL(B3+1,-1,11,Holidays)
4=DATE(YEAR(A2),MONTH(A2)+1,MIN(DAY(A2),
DAY(DATE(YEAR(A2),MONTH(A2)+1+1,0))))
=A4+14=WORKDAY.INTL(B4+1,-1,11,Holidays)
5=A4+15=EOMONTH(A5,0)=WORKDAY.INTL(B5+1,-1,11,Holidays)
6=DATE(YEAR(A4),MONTH(A4)+1,MIN(DAY(A4),
DAY(DATE(YEAR(A4),MONTH(A4)+1+1,0))))
=A6+14=WORKDAY.INTL(B6+1,-1,11,Holidays)
7=A6+15=WORKDAY.INTL(B7+1,-1,11,Holidays)
Does not work for 4/1/15; Result is 3/31/15 instead
8...
9...
2512/16/201512/31/201512/22/201512/28/201512/31/2015
(1/1/16 is a holiday)

<tbody>
</tbody>

Holiday Range:
1/1/2015New Year's Day
1/19/2015MLK Day
2/16/2015Presidents’ Day
5/25/2015Memorial Day
7/4/2015Independence Day
9/7/2015Labor Day
10/12/2015Columbus Day
11/11/2015Veterans Day
11/26/2015Thanksgiving Day
12/25/2015Christmas Day
1/1/2016New Year's Day

<tbody>
</tbody>
 
Last edited:
Upvote 0

Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.
Hi, can you please re-post the table from the post#11 with the expected values manually entered for all of the columns?
 
Upvote 0
Does not work for 4/1/15; Result is 3/31/15 instead

I don't understand why the result should not be 31 March 2015?

Here is a link to the file:
https://www.dropbox.com/s/5xv8ltv3e03zp19/MrExcel-822572.xlsx?dl=0

Note my dates are formatted as YYYY-MM-DD

Excel Workbook
ABCDEFG
1Begin DateEnd DateHourly Employees Time Card DeadlineEmployee Payroll Cut-off DatePay DateHoliday Range:
22015-01-012015-01-152015-01-152015-01-01
32015-01-162015-01-312015-01-312015-01-19
42015-02-012015-02-152015-02-142015-02-16
52015-02-162015-02-282015-02-282015-05-25
62015-03-012015-03-152015-03-142015-07-04
72015-03-162015-03-312015-03-312015-09-07
82015-04-012015-04-152015-04-152015-10-12
92015-11-11
102015-11-26
112015-12-25
122016-01-01
Sheet1
#VALUE!
</td></tr><tr><td ><a href="http://www.online-excel.de/excel/singsel.php?f=60" style="font-family:Arial; font-size:8pt;font-weight:bold;color:#000080;" target='_blank'>Namen verstehen</a></td></tr></table></td></tr></table>
 
Upvote 0
Yes, please see below. Again, I'm sorry for not providing enough information. I wish I could post attachments!

Please also allow me to clarify that paychecks can't be received on Saturdays, Sundays or holidays. Here is the full calendar for 2015:

Beg DateEnd DateHourly Employees
Time Card Deadline
US Employees Payroll Cut-off DatePay Date
1/1/20151/15/20151/7/20151/12/20151/15/2015
1/16/20151/31/20151/23/20151/27/20151/30/2015
2/1/20152/15/20152/6/20152/10/20152/13/2015
2/16/20152/28/20152/21/20152/24/20152/27/2015
3/1/20153/15/20153/6/20153/10/20153/13/2015
3/16/20153/31/20153/20/20153/29/20154/1/2015
4/1/20154/15/20154/7/20154/10/20154/15/2015
4/16/20154/30/20154/22/20154/28/20155/1/2015
5/1/20155/15/20155/7/20155/12/20155/15/2015
5/16/20155/31/20155/22/20155/27/20156/1/2015
6/1/20156/15/20156/5/20156/12/20156/15/2015
6/16/20156/30/20156/22/20156/26/20157/1/2015
7/1/20157/15/20157/7/20157/10/20157/15/2015
7/16/20157/31/20157/22/20157/28/20157/31/2015
8/1/20158/15/20158/7/20158/11/20158/14/2015
8/16/20158/31/20158/21/20158/27/20159/1/2015
9/1/20159/15/20159/8/20159/10/20159/15/2015
9/16/20159/30/20159/22/20159/28/201510/1/2015
10/1/201510/15/201510/7/201510/9/201510/15/2015
10/16/201510/31/201510/22/201510/27/201510/30/2015
11/1/201511/15/201511/6/201511/10/201511/13/2015
11/16/201511/30/201511/20/201511/25/201512/1/2015
12/1/201512/15/201512/7/201512/10/201512/15/2015
12/16/201512/31/201512/22/201512/28/201512/31/2015

<colgroup><col span="2"><col><col><col></colgroup><tbody>
</tbody>
 
Upvote 0
My formula rules are as follows:
* All pay period begin dates should be the 1st or 16th of the month, regardless of the day of the week.
* All pay period end dates should be the 15th or last day of the month
* Time card employees have 5 business days from the previous end date to turn in their hours. (For example, if the pay period ends on 1/31/15, time cards are due 2/6.)
* Payroll cut-off dates are 3 business days prior to the pay date excluding Saturdays, Sundays and holidays.
* Pay dates should be either the 15th or 1st. (I've chosen not to pay on the last day of the month because it changes too much!) Pay days cannot fall on Saturdays, Sundays or holidays. For those days, the default pay date should be the previous day.

I'll also add that the formula for the Begin date should be:
* For 1/16/15 and all 16ths) =A4+15
* For 2/1/15 (and all 1sts) =DATE(YEAR(A4),MONTH(A4)+1,DAY(A4))

Where A4 is the 1st of the prior month. In other words, 2 rows down the formula would be repeated with A6 instead.

Does this help? Thank you so much for walking this through with me!
 
Last edited:
Upvote 0
If the pay date (or any day between it and the payroll submission date) is a holiday or Sunday, it can't be included in the calculation for X days.

Please also allow me to clarify that paychecks can't be received on Saturdays, Sundays or holidays.

This does change things - but can you explain why the "Pay date" for the "End date" of 31st March is the 1st April and not the 31st March?
 
Upvote 0
* Pay dates should be either the 15th or 1st. (I've chosen not to pay on the last day of the month because it changes too much!) Pay days cannot fall on Saturdays, Sundays or holidays. For those days, the default pay date should be the previous day.

I think this is new information - It's easier to use the last day of the month - but I think I understand you data now.
 
Upvote 0
For the pay day try:

=WORKDAY(B2+IF(DAY(B2)=15,1,2),-1,holidays)

For columns A & B try the formulas I posted in post#13
 
Upvote 0
YES, YES, YES. Thank you! :)

I'm reading this formula now and trying to understand it. Is it possible to use what's above (pasted into E2) as a basis for the formula in columns C and D?

For D2, I have: =WORKDAY.INTL(G2,-3,1,HOLIDAYS) and it seems to work
 
Last edited:
Upvote 0
For C3 I have: =WORKDAY.INTL(B2,5,1,HOLIDAYS) and it seems to work.

Just curious . . .why did you use WORKDAY vs. INTL?
 
Upvote 0

Forum statistics

Threads
1,216,550
Messages
6,131,304
Members
449,642
Latest member
jobon

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