+ Reply to Thread
Results 1 to 5 of 5

Bucketing cells with dates based on predefined ranges

Hybrid View

  1. #1
    Registered User
    Join Date
    05-18-2010
    Location
    Europe
    MS-Off Ver
    Excel 2010
    Posts
    54

    Bucketing cells with dates based on predefined ranges

    Hi guys,

    I hope you can help me.

    I have a column with dates like:

    09/15/2011
    09/21/2011
    09/30/2011

    I want to add a column right next to this one in order to bucket these dates based on predefined ranges.
    The ranges are for instance:

    09/15/2011-09/20/2011= phase 1
    09/21/2011-09/29/2011= phase 2
    09/30/2011-10/05/2011= phase 3
    10/06/2011-10/15/2011= phase 4

    I would like to use a formula that would work like this:

    If the date in the cell on the left is between 09/15/2011-09/20/2011 then label this cell as “phase 1”. If it is between 09/21/2011-09/29/2011 → “phase 2”; If it is between 09/30/2011-10/05/2011 → “phase 3”; if it is between 10/06/2011-10/15/2011→ phase 4

    I hope it is clear. If not let me know. Thanks.

    Regards,

  2. #2
    Registered User
    Join Date
    05-18-2010
    Location
    Europe
    MS-Off Ver
    Excel 2010
    Posts
    54

    Re: Bucketing cells with dates based on predefined ranges

    I attached the excel file as maybe my post was not that clear.
    Attached Files Attached Files

  3. #3
    Valued Forum Contributor
    Join Date
    09-07-2006
    Posts
    520

    Re: Bucketing cells with dates based on predefined ranges

    First, you would need to create a proper reference table, ie break-up the existing buckets description with one col for the startdates, an adjacent col for enddates, then a 3rd col for the text descripts (eg phase 1).

    Let's assume this "break-up" reference table has been done in F2:H4, viz Startdates in F2:F5, Enddates in G2:G5, text descripts in H2:H5. Take care to ensure that there are no gaps nor overlaps in the date periods specified in this reference table

    Then you could put this in B2, normal ENTER to confirm will do:
    =INDEX($H$2:$H$5,MATCH(1,INDEX((A2>=$F$2:$F$5)*(A2<=$G$2:$G$5),),0))
    Copy down to return the "phase" description
    Last edited by Max, Singapore; 08-15-2012 at 11:21 PM.

  4. #4
    Registered User
    Join Date
    05-18-2010
    Location
    Europe
    MS-Off Ver
    Excel 2010
    Posts
    54

    Re: Bucketing cells with dates based on predefined ranges

    thank you! it works!

  5. #5
    Valued Forum Contributor
    Join Date
    09-07-2006
    Posts
    520

    Re: Bucketing cells with dates based on predefined ranges

    welcome, glad to hear. Btw, you could also click the little star at the bottom left of my post to express your satisfaction with the response

+ 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