+ Reply to Thread
Results 1 to 4 of 4

Transposing and consolidating a 1d to a 2d table

  1. #1
    Registered User
    Join Date
    06-09-2011
    Location
    usa
    MS-Off Ver
    Excel 2003
    Posts
    2

    Question Transposing and consolidating a 1d to a 2d table

    I am using Excel 2010. I am trying to convert a single dimension table similar to this:

    before.png

    I need to consolidate and transpose the data into a two dimensional table that looks like this:

    after.png

    I've tried using the "transpose" option of the Paste Special. I receive an error because of the fact that I have 135,000+ rows and Excel 2010 only supports 1,048,576 rows by 16,384 columns.

    Transpose.xlsx

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,726

    Re: Transposing and consolidating a 1d to a 2d table

    You can use Advanced Filter to get a unique list of names from your data into another sheet. Insert a new row 1 and put headings in row 1 (like Name, Criteria, Value) and embolden them. Then copy column A into column A of a new sheet, then highlight all the data including the header and click on Data | Advanced (Filter) and in the dialogue box click against Copy to another location, in the Copy To box enter C1, and click Unique records only then OK. Then you can delete columns A and B, leaving you with the unique list of names in the new column A. Put the other headings in B1:D1, i.e. Color, Gender, Age. Then you can use a VLOOKUP formula or an INDEX/MATCH combination to retrieve the appropriate data.

    Hope this helps.

    Pete

  3. #3
    Registered User
    Join Date
    06-09-2011
    Location
    usa
    MS-Off Ver
    Excel 2003
    Posts
    2

    Re: Transposing and consolidating a 1d to a 2d table

    Pete_UK: Thanks for the great ideas! Here is the solution I ultimately came up with to solve this problem.

    In the "Before" sheet, I inserted a column before col-a and created a formula to build a unique index for each item in the table:

    =B1&C1

    Then I copied the formula down for all rows.

    Attachment 270030

    Then I copied columns b:c to the "After" sheet in col-a.

    Attachment 270031

    I used the DATA/REMOVE DUPLICATES on each column independently to get two columns of unique names and data types.

    Attachment 270032

    Next I inserted a blank row at row 1. Then I copied B2:B6 and did a PASTE SPECIAL/TRANSPOSE in cell B1. That created my column headings. Then I cleared the values B2:B6.

    Attachment 270033

    I inserted this formula in cell B2:

    =VLOOKUP($A2&B$1,Before!$A:$D,4,FALSE)

    I copied the formula in B2 to B2:D6. This completed the transformation from 1D to a 2D table I can use.

    Attachment 270034

    Regards,
    Dan
    Attached Files Attached Files
    Last edited by danberg2; 10-09-2013 at 04:08 PM.

  4. #4
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Transposing and consolidating a 1d to a 2d table

    Maybe with the macro below.

    See the attahced file.

    Please Login or Register  to view this content.
    Attached Files Attached Files
    Notice my main language is not English.

    I appreciate it, if you reply on my solution.

    If you are satisfied with the solution, please mark the question solved.

    You can add reputation by clicking on the star * add reputation.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Transposing list of values with 6 zeroes in front to retain the zero after transposing
    By Lisa4legin in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-16-2013, 03:34 AM
  2. [SOLVED] About Transposing
    By billow in forum Excel General
    Replies: 3
    Last Post: 07-26-2012, 06:23 AM
  3. Transposing and more
    By NeilE in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-16-2011, 07:13 AM
  4. Transposing
    By brownstuff in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-24-2010, 08:44 AM
  5. Consolidating & Transposing Data
    By misty0705 in forum Excel General
    Replies: 3
    Last Post: 12-15-2009, 08:01 PM

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