+ Reply to Thread
Results 1 to 4 of 4

Date grouping

  1. #1
    Registered User
    Join Date
    05-01-2012
    Location
    Canada
    MS-Off Ver
    Excel 2007
    Posts
    40

    Date grouping

    Hi All,
    I need help with date grouping. I do apologize if I am in the wrong forum because I did almost same request in the Excel VBA programming and until now I didn’t back any help
    I would like to group a month (for all 12 months) into 4 groups and i.e.
    From 01/MM/YYYY – 07/MM/YYYY = Period 1
    From 08/MM/YYYY – 14/MM/YYYY = Period 2
    From 15/MM/YYYY – 21/MM/YYYY = Period 3
    From 22/MM/YYYY – end of the month/MM/YYYY = Period 4
    Colum A has all dates from Jan 1 until Dec 31 that is 366 rows (for whole calendar year), I need to use formula in column B to group them as Period 1 to period 4 and this will repeat in all months. The date format will be as follows
    Column A Column B
    01/01/2012 Period 1
    02/01/2012 Period 1
    03/01/2012 Period 1
    04/01/2012 Period 1
    05/01/2012 Period 1
    06/01/2012 Period 1
    07/01/2012 Period 1
    08/01/2012 Period 2
    And so on...
    I would appreciate very much your help. I will wait for an answer and I hope I explained it properly.

  2. #2
    Forum Guru benishiryo's Avatar
    Join Date
    03-25-2011
    Location
    Singapore
    MS-Off Ver
    Excel 2013
    Posts
    5,147

    Re: Date grouping

    hi Farida, you may try either of this:
    =IF(DAY(A2)<8,"Period 1",IF(DAY(A2)<15,"Period 2",IF(DAY(A2)<22,"Period 3","Period 4")))
    =LOOKUP(DAY(A2),{0,8,15,22},{"Period 1","Period 2","Period 3","Period 4"})

    Thanks, if you have clicked on the * and added our rep.

    If you're satisfied with the answer, click Thread Tools above your first post, select "Mark your thread as Solved".

    "Contentment is not the fulfillment of what you want, but the realization of what you already have."


    Tips & Tutorials I Compiled | How to Get Quick & Good Answers

  3. #3
    Registered User
    Join Date
    05-01-2012
    Location
    Canada
    MS-Off Ver
    Excel 2007
    Posts
    40

    Re: Date grouping

    Thats wonderful......they worked, both of them.
    Thank you very much

  4. #4
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: Date grouping

    @ Farida

    Based on your last post it seems that you are satisfied with the solution(s) you've received but you haven't marked your thread as SOLVED. I'll do that for you now but please keep in mind for your future threads that Rule #9 requires you to do that yourself. If your problem has not been solved you can use Thread Tools (located above your first post) and choose "Mark this thread as unsolved".
    Thanks.

+ 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