How to find what week of the Month a date falls

Pookiemeister

Well-known Member
Joined
Jan 6, 2012
Messages
626
Office Version
  1. 365
  2. 2010
Platform
  1. Windows
I would like to find some code that shows what week of a particular date falls.
Example: Using today's date mm/dd/yyyy format: 05/09/2024 Looking at a calendar, that date falls on the second week of the month. If I use 05/28/2024 that falls on the fifth week of the Month. Is there code that will show the week of that month? Thank you.
 

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.
2 options, depending on how you define the start of a week:

Book1
ABCD
15/9/20242Weeks are: 1-7, 8-14, 15-21, 22-28, 29-end
25/28/20244
3
45/9/20242Weeks start on Sunday
55/28/20245
Sheet2
Cell Formulas
RangeFormula
B1:B2B1=INT((DAY(A1)-1)/7)+1
B4:B5B4=INT((DAY(A4)+WEEKDAY(EOMONTH(A4,-1)+1)-2)/7)+1
 
Upvote 0
Whoops! I read too fast and missed the part about it being for the beginning of the month as opposed to the beginning of the year.☹️
 
Upvote 0
Here we go with the WeekNum (for weeks starting on Sunday, will only work within the same year):
Excel Formula:
=WEEKNUM(A1,1)-WEEKNUM(EOMONTH(A1,-1)+1,1)+1
 
Upvote 0

Forum statistics

Threads
1,223,099
Messages
6,170,111
Members
452,302
Latest member
TaMere

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