Calculate number of paydays in a month?

charlesstricklin

Board Regular
Joined
May 6, 2013
Messages
95
Office Version
  1. 2021
Platform
  1. Windows
If I give Excel a date (say, January 1, 2015) and assuming I get paid every two weeks on Thursdays, how would I go about finding the number of paychecks per month? (I know it'll either be 2 or 3, of course.)
 

Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December
Don't we need to know the date of the First Thursday in each year you are paid?
 
Upvote 0
The following simply counts the number of Thursdays in a given month, divides this number by 2 and then rounds the retuned value:

Code:
=ROUND(INT((WEEKDAY(A1-5)+DATE(YEAR(A1),MONTH(A1)+1,0)-A1)/7)/2,0)

To Jim's point, this may or may not be what is needed.

Matty
 
Last edited:
Upvote 0
Don't we need to know the date of the First Thursday in each year you are paid?

Thursday, January 1, 2015 will be a payday, so we can use that. And it'll be every other week after that, so I can't assume the first Thursday of 2016 or after will be a payday.
 
Last edited:
Upvote 0
Hi, I did this for you on a spreadsheet. I can email it to you as an attachment?
 
Upvote 0
Excel 2012
ABCDEFGH
1Day of First Thursday in Year = PaydayEnter 1st day
of Month
Desired
Number of
Pay Days
in the Month
Payroll for the Year 2015
2810/1/20153<< The Number of Pay Days in Oct 201511/8/2015
321/22/2015
432/5/2015
542/19/2015
653/5/2015
763/19/2015
874/2/2015
984/16/2015
1094/30/2015
11105/14/2015
12115/28/2015
13126/11/2015
14136/25/2015
15147/9/2015
16157/23/2015
17168/6/2015
18178/20/2015
19189/3/2015
20199/17/2015
212010/1/2015
222110/15/2015
232210/29/2015
242311/12/2015
252411/26/2015
262512/10/2015
272612/24/2015

<COLGROUP><COL style="BACKGROUND-COLOR: #dae7f5"><COL><COL><COL><COL><COL><COL><COL><COL></COLGROUP><THEAD>
</THEAD><TBODY>
</TBODY>
Sheet1

Worksheet Formulas
CellFormula
D2=COUNTIF($H$2:$H$27,">" & EOMONTH($C$2,-1))-COUNTIF($H$2:$H$27,">" &EOMONTH($C$2,0))
E2="<< The Number of Pay Days in " & TEXT(C2,"mmm yyyy")
H2=DATE(YEAR(C2),1,B2)

<THEAD>
</THEAD><TBODY>
</TBODY>

<TBODY>
</TBODY>
 
Upvote 0
column A: Enter 1/1/2015 into cell A2, drag down to fill sequence through 12/31/2015
column B: Month(A2) and drag down
Column C: in C2 enter Thursday and drag down to fill in all the days of the week
Column D: =Isodd(Day(A2))

This is the data. Now set up a table
column F: Jan-Dec
column G: number 1-12 (to correspond with the month)
column H: =COUNTIFS($B$2:$B$366,G2,$C$2:$C$366,"*Thursday*",$D$2:$D$366,"TRUE")
 
Last edited:
Upvote 0
Nice solution Jim. I like the entry cell. You answered his questions for sure!
 
Upvote 0

Forum statistics

Threads
1,215,659
Messages
6,126,068
Members
449,286
Latest member
Lantern

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