+ Reply to Thread
Results 1 to 10 of 10

Need to assign week number to column of dates

  1. #1
    Registered User
    Join Date
    08-28-2012
    Location
    Arkansas
    MS-Off Ver
    Excel 2003
    Posts
    6

    Need to assign week number to column of dates

    I have a file with 25k+ rows of dates; I need to assign a consecutive week # to a set 7 day date range, (Sat-Sun). I have attached an (short) example of what I am trying to achieve. date example.xls

  2. #2
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Need to assign week number to column of dates

    I think you can get the information you need, if you click on this link.

    http://www.cpearson.com/Excel/WeekNumbers.aspx
    Notice my main language is not English.

    I appreciate it, if you reply on my solution.

    If you are satisfied with the solution, please mark the question solved.

    You can add reputation by clicking on the star * add reputation.

  3. #3
    Forum Contributor day92's Avatar
    Join Date
    04-20-2010
    Location
    Los Angeles
    MS-Off Ver
    Excel 360
    Posts
    600

    Re: Need to assign week number to column of dates

    Does this work for you?
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    08-28-2012
    Location
    Arkansas
    MS-Off Ver
    Excel 2003
    Posts
    6

    Re: Need to assign week number to column of dates

    This seems to be exactly what I need - however I am not so savvy with formulas and am not understanding how to write the formula to produce the results I need.

  5. #5
    Registered User
    Join Date
    08-28-2012
    Location
    Arkansas
    MS-Off Ver
    Excel 2003
    Posts
    6

    Re: Need to assign week number to column of dates

    Hello day92 - Just saw your post... that is exactly what I need!!! My start / end day has changed to Wed. start / Tues. end - can you tell me which numbers to change in the formula to achieve those results? Thank you!!!!

  6. #6
    Registered User
    Join Date
    08-28-2012
    Location
    Arkansas
    MS-Off Ver
    Excel 2003
    Posts
    6

    Re: Need to assign week number to column of dates

    Ok, I figured out which numbers to change in the formula. But, I have dates in 2011 & 2012 - I need the week #s to be consecutive into 2012; with the current formula; =INT((AE3-DATE(YEAR(AE3-WEEKDAY(AE3-3)+6),1,6)+WEEKDAY(DATE(YEAR(AE3-WEEKDAY(AE3-4)+6),1,3))+6)/7) the weeks start over with 1 in 2012. Any thoughts??

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

    Re: Need to assign week number to column of dates

    So weeks start on Wednesdays.......but when does week 1 start, is there a rule (like 1st Wednesday of the year or 1st Wednesday after a specific date)?
    Audere est facere

  8. #8
    Registered User
    Join Date
    08-28-2012
    Location
    Arkansas
    MS-Off Ver
    Excel 2003
    Posts
    6

    Re: Need to assign week number to column of dates

    week one starts with first Wed of the year - but since I need the weeks to run consecutive into 2012; week one would start with first Wed in 2011...

  9. #9
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: Need to assign week number to column of dates

    OK so week 1 starts on Wednesday 5th Jan 2011 and numbering keep going indefinitely without resetting to zero, so today is the first day of week 87?

    With date in A2 try this formula for the week number

    =INT((A2-DATE(2011,1,5))/7)+1

  10. #10
    Registered User
    Join Date
    08-28-2012
    Location
    Arkansas
    MS-Off Ver
    Excel 2003
    Posts
    6

    Re: Need to assign week number to column of dates

    Thank you!!! Thank you!!! That works!!!

+ 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