Week of the month for any year

SoulSeeker

New Member
Joined
Feb 26, 2011
Messages
12
Hi,

I would like to get some help on an issue i am having. Im trying to do this:
Date Work Week Number
01/02/2011 Week 1 1

In the example above i have a cell lets say A1 that has the date on the example, i want to know what week number from the month is that date (Work Week starts on Sunday). So if it were 01/30/2011 that would be week 1 of february and if it were 03/27/2011 that would be week 5. Any help is appreciated.

Thanks
 

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).
I don't understand why 01/30/2011 is not week 5 of January while 03/27/2011 is week 5 of March.

If the week starts on a Sunday, then wouldn't the month that the week's Sunday is in be the Month that the entire week is counted within?

What are the rules (criteria) to determine what month the week is counted within when the week straddles two months?
 
Upvote 0
The reason is because we are talking about work weeks which start on Sunday. Which means:
1/2/11 - 1/8/11 is Week 1
1/9/11 - 1/15/11 is Week 2
1/16/11 - 1/22/11 is Week 3
1/23/11 - 1/29/11 is Week 4

1/30/11 - 2/5/11 is Week 1 of Feb
2/6/11 - 2/12/11 is Week 2 of Feb

And so on. Here's a 2011 Work Week Calendar which has the week number right beside it but what i need is if i give a random date give me the week number based on that.
 
Upvote 0
Just noticed the error, my bad that was a typo. 02/27/2011 would be Week 1 of March and 03/27/2011 would be Week 1 of April, while 04/24/2011 would be Week 5 of April
 
Upvote 0
According to your calendar, wouldn't 03/27/2011 be week 1 of April?

EDIT: Just saw your most recent post. Got it.
 
Upvote 0
So yes, that's basically what i need. If i say 04/24/2011 it gives me a number 5. Which means that's Week 5 of that month
 
Upvote 0
So far the closest formula i was able to get is:
=INT((13-WEEKDAY(N466)+DAY(N466))/7)-1

But it breaks when the week includes another month. Any ideas?
 
Upvote 0
Excel Workbook
ABC
1DateWeek NumberMonth
2Saturday, January 01, 20115Dec-2010
3Sunday, January 02, 20111Jan-2011
4Wednesday, January 26, 20114Jan-2011
5Monday, January 31, 20111Feb-2011
6Tuesday, February 01, 20111Feb-2011
7Sunday, February 27, 20111Mar-2011
8Tuesday, March 01, 20111Mar-2011
9Thursday, March 31, 20111Apr-2011
10Friday, April 01, 20111Apr-2011
11Sunday, April 24, 20115Apr-2011
12Sunday, May 01, 20111May-2011
...
Cell Formulas
RangeFormula
B2=INT(DAY(A2+6-WEEKDAY(A2,1))/7)+1-IF(AND(DAY(DATE(YEAR(A2),1,1)+7-WEEKDAY(DATE(YEAR(A2),1,1),2))>1,MONTH(A2+6-WEEKDAY(A2,1))=1),1,0)
C2=TEXT(A2+6-WEEKDAY(A2,1), "mmm-yyyy")
 
Upvote 0
My friend, that is exactly what i wanted, you just got a degree as an Excel Master hehe... I was looking into several other threads made by people requesting the same thing, and this answers it all. Thanks a lot
 
Upvote 0

Forum statistics

Threads
1,224,616
Messages
6,179,912
Members
452,949
Latest member
beartooth91

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