+ Reply to Thread
Results 1 to 7 of 7

Convert repeating data into a list

  1. #1
    Registered User
    Join Date
    09-26-2009
    Location
    Seattle, WA
    MS-Off Ver
    Excel 2003
    Posts
    12

    Smile Convert repeating data into a list

    Hello,
    I am having real trouble converting repeating data into a list format. The first table below shows how my data is right now. Basically, I would like to convert the repeating data elements (name, age, gender and grade) into a list, as you will see in the second table. I've tried a bunch of things, but I'm stuck.

    Is there a way to convert my data into a list? Any help would be very much appreciated. I have attached an Excel file to more clearly show things.

    How the Data is formatted right now (I show "|" to illustrate the separation of columns in Excel. And each row in my data shown here is in a separate row in Excel).
    Name | Peter
    Age | 26
    Gender | M
    Grade | A
    Name | Alexia
    Age | 23
    Gender | F
    Grade | C
    Name | Scott
    Age | 32
    Gender | M
    Grade | B


    And I would like the data to look like this:
    Name | Age | Gender | Grade
    Peter | 26 | M | A
    Alexia | 23 | F | C
    Scott | 32 | M | B


    Thanks,
    Peter (in Seattle)
    Attached Files Attached Files
    Last edited by Peter33; 09-26-2009 at 12:52 PM. Reason: An attachement was requested.

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

    Re: Convert repeating data into a list

    Yes you can do this (using INDEX formulae or VBA) but...

    To best describe or illustrate your problem you would be better off attaching a dummy workbook, the workbook should contain the same structure and some dummy data of the same type as the type you have in your real workbook - so, if a cell contains numbers & letters in this format abc-123 then that should be reflected in the dummy workbook.

    If needed supply a before and after sheet in the workbook so the person helping you can see what you are trying to achieve.

  3. #3
    Registered User
    Join Date
    09-26-2009
    Location
    Seattle, WA
    MS-Off Ver
    Excel 2003
    Posts
    12

    Re: Convert repeating data into a list

    I have attached an excel file as you requested.
    Thanks, Peter

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

    Re: Convert repeating data into a list

    Based on your file, firstly:

    Please Login or Register  to view this content.
    Then

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    10-28-2008
    Location
    Turkey
    Posts
    88

    Re: Convert repeating data into a list

    Quote Originally Posted by Peter33 View Post
    Hello,
    I am having real trouble converting repeating data into a list format. The first table below shows how my data is right now. Basically, I would like to convert the repeating data elements (name, age, gender and grade) into a list, as you will see in the second table. I've tried a bunch of things, but I'm stuck.

    Is there a way to convert my data into a list? Any help would be very much appreciated. I have attached an Excel file to more clearly show things.

    How the Data is formatted right now (I show "|" to illustrate the separation of columns in Excel. And each row in my data shown here is in a separate row in Excel).
    Name | Peter
    Age | 26
    Gender | M
    Grade | A
    Name | Alexia
    Age | 23
    Gender | F
    Grade | C
    Name | Scott
    Age | 32
    Gender | M
    Grade | B


    And I would like the data to look like this:
    Name | Age | Gender | Grade
    Peter | 26 | M | A
    Alexia | 23 | F | C
    Scott | 32 | M | B


    Thanks,
    Peter (in Seattle)


    You can find your file below.

    .
    Attached Files Attached Files
    Last edited by yurttas; 09-26-2009 at 01:45 PM.

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

    Re: Convert repeating data into a list

    Worth adding that INDIRECT (unlike INDEX) is Volatile so pending volume of data this may be worthy of consideration... for more info. on Volatility see link in sig. to Charles Williams' site.

  7. #7
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Convert repeating data into a list

    dk's can be put into one formula if you dont want an added cell
    =IF(ROWS(D$2:D2)>COUNTA($A:$A)/4,"",INDEX($B:$B,COLUMNS($D2:D2)+(4*(ROWS(D$2:D2)-1)))
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

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