+ Reply to Thread
Results 1 to 4 of 4

Changing date to week number

  1. #1
    Registered User
    Join Date
    10-06-2011
    Location
    Salt Lake City, UT
    MS-Off Ver
    Excel 2010
    Posts
    78

    Changing date to week number

    I can't seem to figure this one out.

    I want to calculate a month and week number from a date. Each week starts on a Friday. So whatever month the Friday is in determines the month and week number.

    For example,

    1/6/2012 - 1/12/2012 is January week 1
    1/13/2012 -1/19/2012 is January week 2
    ...
    2/3 - 2/9 is February week 1
    etc.

    How can I make this calculation?

    See the attached file. And thank you
    Attached Files Attached Files
    Last edited by perducci; 03-19-2012 at 11:01 AM.

  2. #2
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Changing date to week number

    Hi

    In C3.

    =INT((DAY(A3)-1)/7)+1


    Copy down
    Regards

    Fotis.

    -This is my Greek whisper to Europe.

    --Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

    Advanced Excel Techniques: http://excelxor.com/

    --KISS(Keep it simple Stupid)

    --Bring them back.

    ---See about Acropolis of Athens.

    --Visit Greece.

  3. #3
    Forum Contributor
    Join Date
    01-28-2010
    Location
    Riverside, CA
    MS-Off Ver
    Excel 2010
    Posts
    132

    Re: Changing date to week number

    Going on what Fotis did:

    if date is in A2:

    Please Login or Register  to view this content.
    Happy Excel'ing!

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

    Re: Changing date to week number

    Quote Originally Posted by perducci View Post
    ....Each week starts on a Friday. So whatever month the Friday is in determines the month and week number
    Taking into account this stipulation you can get the week number alone with this formula

    =INT((6+DAY(A3+1-WEEKDAY(A3+2)))/7)

    format as general

    or if you want week number and month like "January week 3" then use this version

    =TEXT(A3+1-WEEKDAY(A3+2),"mmmm")&" week "&INT((6+DAY(A3+1-WEEKDAY(A3+2)))/7)
    Audere est facere

+ 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