+ Reply to Thread
Results 1 to 17 of 17

Calculate week number for Fiscal Year Dates

Hybrid View

katie_10042 Calculate week number for... 04-26-2010, 10:38 AM
ChemistB Re: Calculate week number for... 04-26-2010, 10:58 AM
Palmetto Re: Calculate week number for... 04-26-2010, 10:59 AM
ChemistB Re: Calculate week number for... 04-26-2010, 11:10 AM
sailepaty Re: Calculate week number for... 04-26-2010, 12:07 PM
katie_10042 Re: Calculate week number for... 04-26-2010, 05:00 PM
daddylonglegs Re: Calculate week number for... 04-26-2010, 06:06 PM
FDibbins Re: Calculate week number for... 12-14-2016, 11:51 PM
  1. #1
    Registered User
    Join Date
    04-26-2010
    Location
    Houston, Texas
    MS-Off Ver
    Excel 2003
    Posts
    11

    Calculate week number for Fiscal Year Dates

    My fiscal year starts on October 1st and I have a total of 53 weeks in a year. Saturday is considered the first day of the week. How do I calculate the week number of a specific date? For instance, if the date is 4/10/2010, the week number should be 29.
    Last edited by katie_10042; 04-26-2010 at 05:05 PM. Reason: Solved

  2. #2
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Calculate week number for Fiscal Year Dates

    Try this formula
    =53-WEEKNUM(DATE(YEAR(B1)-1,10,1))+WEEKNUM(B1)
    where your current date is in B1. It does however give me 28 with your example. Double check your count. If it really is 29, then modify the formula with +1. Does that work for you?
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  3. #3
    Forum Expert Palmetto's Avatar
    Join Date
    04-04-2007
    Location
    South Eastern, USA
    MS-Off Ver
    XP, 2007, 2010
    Posts
    3,978

    Re: Calculate week number for Fiscal Year Dates

    EDIT: deleted formula
    Last edited by Palmetto; 04-26-2010 at 03:42 PM. Reason: formula does not return correct result
    Palmetto

    Do you know . . . ?

    You can leave feedback and add to the reputation of all who contributed a helpful response to your solution by clicking the star icon located at the left in one of their post in this thread.

  4. #4
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Calculate week number for Fiscal Year Dates

    Oh, My formula will only work up until October 1st. Oppps, it expands to
    =IF(MONTH(B1)>=10,WEEKNUM(B1)-WEEKNUM(DATE(YEAR(B1),10,1))+1,53-WEEKNUM(DATE(YEAR(B1)-1,10,1))+WEEKNUM(B1))

    I'm thinking someone here can simplify.

  5. #5
    Valued Forum Contributor
    Join Date
    02-08-2010
    Location
    Dallas, TX
    MS-Off Ver
    Excel 2007
    Posts
    122

    Re: Calculate week number for Fiscal Year Dates

    Try this,

    A1=04/10/2010

    =INT((A1-WEEKDAY(A1+1)-DATE(YEAR(A1+7-WEEKDAY(A1+1))-(MONTH(A1)<10),10,1))/7)+2

    Reagards

  6. #6
    Registered User
    Join Date
    04-26-2010
    Location
    Houston, Texas
    MS-Off Ver
    Excel 2003
    Posts
    11

    Re: Calculate week number for Fiscal Year Dates

    Thanks sailepaty! The formula works perfectly!

  7. #7
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    Microsoft 365
    Posts
    14,723

    Re: Calculate week number for Fiscal Year Dates

    If A1 is 31st December 2011 sailepaty's formula returns -38, and you get similar results for the last few days of some other years.

    Assuming your week numbers are defined as follows:

    week 1 starts on 1st October then week 2 starts on the next Saturday after that, then you can use this formula to get the week numbers

    =INT((A1-DATE(YEAR(A1+92)-1,10,1)-WEEKDAY(A1+1))/7)+2

    Like WEEKNUM function that formula can give you 54 in certain circumstances (only on 30th Sept if that day is a Saturday and the year is a leap year - although the next one isn't until 2028!)

  8. #8
    Valued Forum Contributor
    Join Date
    02-08-2010
    Location
    Dallas, TX
    MS-Off Ver
    Excel 2007
    Posts
    122

    Re: Calculate week number for Fiscal Year Dates

    Quote Originally Posted by daddylonglegs View Post
    If A1 is 31st December 2011 sailepaty's formula returns -38, and you get similar results for the last few days of some other years.
    I think this one works better.

    =INT((A1-WEEKDAY(A1+1)-DATE(YEAR(A1)-(MONTH(A1)<10),10,1))/7)+2

    Reagrds

  9. #9
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,048

    Re: Calculate week number for Fiscal Year Dates

    ILP welcome to the forum

    Unfortunately your post does not comply with Rule 2 of our Forum RULES. Do not post a question in the thread of another member -- start your own thread.

    If you feel an existing thread is particularly relevant to your need, provide a link to the other thread in your new thread.

    Old threads are often only monitored by the original participants. New threads not only open you up to all possible participants again, they typically get faster response, too.
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1