Longer months with more weeks.

rjs1943

Board Regular
Joined
Mar 9, 2010
Messages
55
I need a formula to find which months have more weeks than others. I get paid every fourth Wednesday. Some months, sometimes 4 or 5, I have to wait 5 weeks between paydays, most other months I wait 4 weeks between paydays. Need a formula to tell me which months has 5 weeks between every 4th Wednesday. The rest of the months will show me 4 weeks between paydays.

Thanks:
Rich :):confused:
 

Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"
if you do something like this
A2 down, 1st of month, drag to extend
b2 down =DATE(YEAR(A2),MONTH(A2),8)-WEEKDAY(DATE(YEAR(A2),MONTH(A2),4))+21
quick test in C2 =B2 and format as ddd
in D3 =B3-B2 gives you a day count between each line
in E3 =D3/7 shows 4 or 5
 
Upvote 0
If you have some date in cell A1, the following formula will return the fourth Wednesday of the corresponding month:

=WORKDAY.INTL(EOMONTH(A1,-1),4,"1101111")
 
Upvote 0
If to you a week begins every Monday, then with =DATE(2018,ROW(A1),1+1*7)-WEEKDAY(DATE(2018,ROW(A1),8-4)) in say B1, copied down (date of the first Wednesday in each month) and =EOMONTH(DATEVALUE("12/31/2017"),ROW(A1)-1)+1 in C1 (date of the first of the month), B1-C1 (difference) in D1, you can spot any month with a value >=5 as having the 4th Wednesday occur during the 5th week.
 
Last edited:
Upvote 0
or just

=WEEKDAY(EOMONTH(DATEVALUE("12/31/2017"),ROW(A1)-1)+1)>4

copied down works too
 
Last edited:
Upvote 0

Excel 2010
BC
11/24/2018
22/28/201835
33/28/201828
44/25/201828
55/23/201828
66/27/201835
77/25/201828
88/22/201828
99/26/201835
1010/24/201828
1111/28/201835
1212/26/201828
131/23/201928
142/27/201935
153/27/201928
Sheet2
Cell Formulas
RangeFormula
B1=DATE(2018,ROW(A1),1+4*7)-WEEKDAY(DATE(2018,ROW(A1),8-4))
C2=B2-B1
 
Upvote 0
If you don't want to maintain a list of paydays on a worksheet, the following formula will tell you directly how many weeks between the current month's payday and next month's payday (no matter what the current day is in the current month)...

="Weeks between this and next month's paydays: "&(DAY(DATE(YEAR(NOW()),MONTH(NOW())+1,29)-WEEKDAY(DATE(YEAR(NOW()),MONTH(NOW())+1,4)))+(DAY(EOMONTH(NOW(),0))-DAY(DATE(YEAR(NOW()),MONTH(NOW()),29)-WEEKDAY(DATE(YEAR(NOW()),MONTH(NOW()),4)))))/7
 
Upvote 0
A slightly shorter one (based on formula from Post # 4):

="Weeks between this and next month's paydays: "&SUM(WORKDAY.INTL(EOMONTH(NOW(),{0,-1}),4,"1101111")*{1,-1})/7
 
Last edited:
Upvote 0

Forum statistics

Threads
1,223,237
Messages
6,170,924
Members
452,366
Latest member
TePunaBloke

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