+ Reply to Thread
Results 1 to 5 of 5

Group dates into weeks

Hybrid View

  1. #1
    Registered User
    Join Date
    03-06-2011
    Location
    mumbai
    MS-Off Ver
    Excel 2003
    Posts
    4

    Group dates into weeks

    Hello,

    I would like to group the dates into group of 7 days (Weeks) starting with Monday.

    Also for the current week that is going on, i want them to appear as just days.


    Thanks in advance

    Sample input and expected output is as shown in the attached excel.
    Attached Files Attached Files

  2. #2
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: Group dates into weeks

    You can do this with formulae, see the attached workbook.

    By putting this in say A1
    Formula: copy to clipboard
    =TODAY()

    In A2, this assumes that your input list always starts with a Monday
    Formula: copy to clipboard
    =Input!A3

    Then in A3, drag/Fill down
    Formula: copy to clipboard
    =IF(COUNTIF($B$2:B2,"")>5,"",IF(A2<=$A$1-7,A2+7,A2+1))

    See the workbook for the formulae in B2:D2

    This will work dynamically, drag A20:D20 down to extend the table as your input data grows.

    Note that Sheet "input" ColumnB "Day" isn't required.

    Also your profile states you are using 2003, but the sample you attached is 2007 or above.
    This will not work in 2003, although it can easily be adapted if required.
    Attached Files Attached Files
    Last edited by Marcol; 05-18-2013 at 06:16 AM.
    If you need any more information, please feel free to ask.

    However,If this takes care of your needs, please select Thread Tools from menu above and set this topic to SOLVED. It helps everybody! ....

    Also
    اس کی مدد کرتا ہے اگر
    شکریہ کہنے کے لئے سٹار کلک کریں
    If you are satisfied by any members response to your problem please consider using the small Star icon bottom left of their post to show your appreciation.

  3. #3
    Registered User
    Join Date
    03-06-2011
    Location
    mumbai
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: Group dates into weeks

    Thats great Marcol !

    I added 19th may in the input sheet, output sheet doesn't get updated dynamically.
    Attached Files Attached Files

  4. #4
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: Group dates into weeks

    19th May is a Sunday, your sample sheet doesn't show Sunday in the required list.
    It is included in the total sum of weekly counts.

    Do you need it to show as the last entry?

    If so change A3 to this, then drag down.
    Formula: copy to clipboard
    =IF(COUNTIF($B$2:B2,"")>6,"",IF(A2<=$A$1-7,A2+7,A2+1))

    If there is no data for tht date you'll get #/NA in Column D.

    The table will not advance until Monday 20 May.

  5. #5
    Registered User
    Join Date
    03-06-2011
    Location
    mumbai
    MS-Off Ver
    Excel 2003
    Posts
    4

    Thumbs up Re: Group dates into weeks

    Great !! it works great !

    Thanks a lot mate !

+ 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