Week Number First Day Of Week

salahmost

Board Regular
Joined
Feb 19, 2007
Messages
68
I use the following formula from:
http://www.cpearson.com/excel/WeekNumbers.aspx
to get the week number depending on first occurrence of "Saturday". For example, that Week 1 begins on the first Saturday of the year. The formula is:
=TRUNC(((A1-DATE(YEAR(A1),1,1)+MOD(7-WEEKDAY(DATE(YEAR(A1),1,1)),7))+6)/7)
Where A1 Contains the date I want to get its week number.
If A1 contains 1/1/2011 the result is 0 instead of 1 ....what'wrong ?
 

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.
You will get the correct answer if you use the "Absolute Week Number" formula posted earlier on CPearson's page.

In your usage, would Saturday, January first be "week 1" of the year 2011 or the last day of week 52 of the previous year?
 
Upvote 0
If week 1 starts on the first Saturday which week should apply to any dates before the first Saturday, are they in the last week of the previous year?
 
Upvote 0
Thank you ...
The "Absolute Week Number" formula does the trick.
--
If week 1 starts on the first Saturday which week should apply to any dates before the first Saturday, are they in the last week of the previous year?
It doesn't matter if 52 or 1 the first Saturday should be 1.
 
Upvote 0
Are you only concerned with Saturdays or might you want to get the week number for another day of the week? If it's the former then absolute week numbers will work fine for you for any year but if it's the latter then you might not get the results you want for 2012 or other years......
 
Upvote 0
I'm only concerned with Saturdays. Although the The "Absolute Week Number" formula does the trick, I wonder if the formula related to special day on CPearson's page need to be modified.
 
Upvote 0

Forum statistics

Threads
1,216,076
Messages
6,128,670
Members
449,463
Latest member
Jojomen56

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