+ Reply to Thread
Results 1 to 4 of 4

grouping data

  1. #1
    Registered User
    Join Date
    12-24-2006
    Posts
    1

    grouping data

    I am sorry if I posted this in the wrong section. I am not quite sure where it should go. Anyhoo, does anyone know how to group data. For instance, lets say I have:

    24
    25
    21
    33
    33
    33
    42
    44
    44

    And I wanted a chart that said :

    24 1
    25 1
    21 1
    33 3
    42 1
    44 2

    So basically I want to the number of times each value was present in my list. Any ideas on how to do this?


    Thanks for any help.

    Brendan

  2. #2
    Forum Contributor
    Join Date
    11-29-2003
    Posts
    1,203
    One easy way to do this (assuming you really have a lot more data than is shown) would be to create a Pivot table / Pivot Chart based on your datatable.

    See Excel's menu Data >> Pivot Table. In Step one of the wizard, use the default selections. In Step 2, select the column with your data. Note that the column of Data needs to have a header row.

    In the pivot table itself, drag in the data's header twice, once in the "rows", and again in the "data".

    After that, right click anywhere in the Pivot table and select the Wizard. This time, click on the "Layout" button. In the layout, right-click on the data's header in the "data" section, and change the field from Sum (the default) to "Count".

    After you have the data table the way you want it, use the Pivot Table toolbar and click on the Chart button. This will create the chart you seek.
    Last edited by MSP77079; 12-24-2006 at 07:42 PM.

  3. #3
    Forum Contributor
    Join Date
    03-13-2005
    Posts
    6,195
    Quote Originally Posted by bconnor
    I am sorry if I posted this in the wrong section. I am not quite sure where it should go. Anyhoo, does anyone know how to group data. For instance, lets say I have:

    24
    25
    21
    33
    33
    33
    42
    44
    44

    And I wanted a chart that said :

    24 1
    25 1
    21 1
    33 3
    42 1
    44 2

    So basically I want to the number of times each value was present in my list. Any ideas on how to do this?


    Thanks for any help.

    Brendan
    If the Pivot Table beats you, you can put, in B1,

    =IF(COUNTIF(A$1:A1,A1)>1,"",COUNTIF(A:A,A1))

    and formula fill that to the end of your data, then Data Filter and filter column B for Non-Blanks

    Copy the rows displayed to a new location.

    But, it's worthwhile to practice with the Pivot Table.

    hth
    ---
    Si fractum non sit, noli id reficere.

  4. #4
    Banned User!
    Join Date
    10-14-2006
    Posts
    1,211
    Quote Originally Posted by bconnor
    I am sorry if I posted this in the wrong section. I am not quite sure where it should go. Anyhoo, does anyone know how to group data. For instance, lets say I have:

    24
    25
    21
    33
    33
    33
    42
    44
    44

    And I wanted a chart that said :

    24 1
    25 1
    21 1
    33 3
    42 1
    44 2

    So basically I want to the number of times each value was present in my list. Any ideas on how to do this?


    Thanks for any help.

    Brendan
    -First you need to create a header in row1 and your datat start from A2:A10
    -In the menu select Data > Filter > Advanced Filter > under Action select Copy to another location > List range: select A1:A10 (of couse including a header) > Copy to: select your empty cell B1 > click Unique recods only > click OK. Now you have all the unique record in B1:B10
    - Formula in C2 =COUNTIF($A$2:$A$10,B2)
    - Drag from C2 to C10

+ 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