+ Reply to Thread
Results 1 to 6 of 6

Problem turning list to table

  1. #1
    Registered User
    Join Date
    03-03-2010
    Location
    Australia, Melbourne
    MS-Off Ver
    Excel 2007
    Posts
    3

    Problem turning list to table

    Hi
    I have a problem turning a lsit of data into a table, I would appreciate help. The list looks like.

    The list is quite long (4000 obs) and 37 categories (Area)

    Area Length
    A 12
    A 14
    A 13
    A 10
    B 5
    B 7
    B 9
    . .
    ETC n

    To this

    A B C ..... Z
    12 5 n ......Z
    14 7 n .......Z
    13 9 n .......Z
    10 n n .......Z

    Where n is an observation at Area

    I do not want to manipulate these data in any way, just re-arrange them in a MxN table. The numbers in each area may be different. I am using Ecel 2007. Sorry if this question is silly, but for some reason, it has me stumped.

    Thanks in advance NoviceGuy....
    I have tried everything I can think of but still no luck. T

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Problem turning list to table

    Post up a not-oversimplified example workbook.

    Click GO ADVANCED and use the paperclip icon to post up your workbook.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Registered User
    Join Date
    03-03-2010
    Location
    Australia, Melbourne
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Problem turning list to table

    Here is the spreadsheet, it also has my Novice-like approach to the problem (which doesn't work). I'm sure I'm missing something simple here.

    NG
    Attached Files Attached Files

  4. #4
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Problem turning list to table

    Name the data sheet Data.
    Name an empty sheet Output.

    Run this macro:
    Please Login or Register  to view this content.

    The simple things (?) here we are using are Advanced Filter/Sort to get the unique values, and copy/paste/transpose to put them in a row as headers.

    Then we are using the AUTOFILTER on the column A to display all the rows of each header value one at a time. Then we copy the filtered results to the columns in sequence. Copying is only taking visible cells.

  5. #5
    Registered User
    Join Date
    03-03-2010
    Location
    Australia, Melbourne
    MS-Off Ver
    Excel 2007
    Posts
    3

    Thumbs up Solved

    You are THE man Jerry, full qudos to you my friend. I'm glad the solution wasn't as simple as I thought it would be. I have learned a lot from your code example. It works, perfectly. I will still need to lookup the autofilter and other functions I am not familiar withm but that's my homework. Sleep well tonight your mission is accomplished.

    Again, a big thankyou.
    NG
    ps. how do I mark this as solved?
    Last edited by NoviceGuy; 03-04-2010 at 12:28 AM. Reason: SOLVED

  6. #6
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Problem turning list to table

    If that takes care of your need, please click EDIT in your original post, click GO ADVANCED and set the PREFIX box to SOLVED.

    (Also, use the blue "scales" icon in our posts to leave Reputation Feedback, it is appreciated. It is found across from the "time" in each of our posts.)

+ 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