+ Reply to Thread
Results 1 to 7 of 7

split data into ranges

  1. #1
    Registered User
    Join Date
    11-24-2009
    Location
    Tallinn, Estonia
    MS-Off Ver
    Excel 2007
    Posts
    3

    split data into ranges

    hey,

    i have a list of numerical values, like:
    1
    2
    2
    4
    5
    6
    8
    10
    12
    14
    etc

    how can i split them into ranges and count the items in the ranges:
    like:
    1-5: 5
    6-10: 3
    11:15: 2

    naturally, the actual table is way bigger so something as automatic as possible is needed.

    thanks!
    Mait

  2. #2
    Valued Forum Contributor khamilton's Avatar
    Join Date
    10-08-2009
    Location
    IL
    MS-Off Ver
    Excel 2007
    Posts
    345

    Re: split data into ranges

    try =countifs(A:A,">=1",A:A,"<=5")

  3. #3
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: split data into ranges

    If the ranges are consistent you can push your data into a Pivot Table, set the number field as both Row Label and Data Field (set to COUNT)... you can then in turn Group the Row field by Interval of 5 starting from 1

    see attached (2007 format) for proof of concept.

    If the intervals are not consistent then you could use COUNTIFS as outlined already by khamilton or think about using a helper column adjacent to the numbers to allocate each number to a group and use that helper column in your PT as Row Label.
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    11-24-2009
    Location
    Tallinn, Estonia
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: split data into ranges

    hey,

    thanks for the tips.
    the pivot thing wont work, excel says "cannot group that selection".
    any ideas on what should i do here?

    i managed to use the countifs for now, but since the number of ranges is high
    (at the moment ~1000, should be much more), it's not the ideal scenario.

    my data constists of ~10000 entries, numerical values ranging from 1.0 to 400
    i want to plot the distribution on a graph.
    maybe dividing them into ranges is not the best solution?

    Mait

  5. #5
    Registered User
    Join Date
    11-24-2009
    Location
    Tallinn, Estonia
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: split data into ranges

    hey,

    ok, got the pivot table grouping to work now.
    just copied the data into a clean sheet ...

    one question though:
    when pivot table says "1-5" and "5-10" then i guess it means
    1>x=>5 and 5>x=>10, right? no overlapping of numbers?

    Mait

  6. #6
    Registered User
    Join Date
    05-04-2012
    Location
    **** OFF WHY DO YOU NEED CAPTCHA AND READ AND WRITE VERIFICATION????
    MS-Off Ver
    Excel 2003
    Posts
    1

    Re: split data into ranges

    Quote Originally Posted by DonkeyOte View Post
    If the ranges are consistent you can push your data into a Pivot Table, set the number field as both Row Label and Data Field (set to COUNT)... you can then in turn Group the Row field by Interval of 5 starting from 1

    see attached (2007 format) for proof of concept.

    If the intervals are not consistent then you could use COUNTIFS as outlined already by khamilton or think about using a helper column adjacent to the numbers to allocate each number to a group and use that helper column in your PT as Row Label.
    How did you do that? I downloaded the file and the file works, but when I try to do it on my own pivot table it adds a new field.

  7. #7
    Registered User
    Join Date
    10-23-2012
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2007
    Posts
    1

    Re: split data into ranges

    "Khamilton"
    Needed this today...............This Works.....................Thanks..
    Last edited by vijaythe1; 10-23-2012 at 06:17 AM. Reason: TO Address

+ 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