+ Reply to Thread
Results 1 to 4 of 4

Convert column data into row headings to get the desired table.

  1. #1
    Registered User
    Join Date
    08-29-2013
    Location
    India
    MS-Off Ver
    Excel 2003
    Posts
    26

    Convert column data into row headings to get the desired table.

    Hi, all,

    I have a table as follows:-

    ID NAME CAT
    1 Ris 100-Q
    2 Ris 300-Q
    3 Aj 100-Q
    4 Gog 100-Q
    5 Gog 200-I
    6 Ras 200-Q
    7 Van 300-Q
    8 Van 300-I

    I wish to convert it to the following format:-

    ID NAME 100-Q 200-Q 300-Q 100-I 200-I 300-I
    1 Ris 100 300
    2 Aj 100
    3 Gog 100 200-I
    4 Ras 200
    5 Van 300-Q 300-I

    So that the user name becomes unique and the CAT column data is converted into rows headings and filled appropriately as shown.
    For e.g. Ris has 2 rows in table 1 and in table2 in Row 1, Ris's two categories are shown appropriately and the need for the 2nd row is elinimated.
    I hope I have been able to explain this sufficiently well.

    Kindly help,
    Thanks All !

  2. #2
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.84 for Mac MS 365
    Posts
    8,499

    Re: Convert column data into row headings to get the desired table.

    that could be as simple as copy the column you want then put the cursor where you want them and do paste special >> transpose then delete the originals.
    Make contributors happy, click on the "* Add Reputation" as a way to say thank you.
    Sam Capricci

  3. #3
    Registered User
    Join Date
    08-29-2013
    Location
    India
    MS-Off Ver
    Excel 2003
    Posts
    26

    Re: Convert column data into row headings to get the desired table.

    Hi Sambo kid,

    Thanks for the reply,

    However, that will nor produce the final table, i think. I need to get rid of the duplicates in table 1. Also I need that the correct values of categories be placed in the correct columns as shown in table 2.

    A simple transpose would only give me the headings, not generate the values or delete the duplicates.

    What do you think ?

    Thanks loads.

  4. #4
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,556

    Re: Convert column data into row headings to get the desired table.

    I believe that the following will work with the 2003 version of Excel although I don't have a copy of that version with which to test.
    As for the unique names copy the names to another column (F) and apply the remove duplicates feature.
    As for the ID's (column E), populate using: =IF(F2<>"",SUM(E1,1),"")
    The column headers for the categories are manually populated
    The range under the category headers is populated using*:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    *Denotes an array entered formula which needs to be confirmed by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER. You will know the array is active when you see curly braces { } appear around your formula. If you do not CTRL+SHIFT+ENTER you will get an error or a clearly incorrect answer.
    Let us know if you have any questions.
    Attached Files Attached Files
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

+ 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. [SOLVED] Macro to convert a Flat Data with many Headings to a Database with few Headings
    By rehana402003 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 11-10-2017, 06:51 AM
  2. How to make a Templates column headings dynamic with the Pivot table headings
    By DashBD in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-20-2017, 05:20 PM
  3. [SOLVED] Sorting data from a table with identical column headings
    By Stephen23 in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 03-11-2015, 09:27 AM
  4. Convert Column headings and values into Row data
    By cjexpat in forum Excel General
    Replies: 2
    Last Post: 12-14-2014, 12:18 PM
  5. Creating a pivot table from raw data with both row and column headings
    By marshymell0 in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 07-03-2013, 04:31 AM
  6. Need to convert cell values to column headings
    By faizaan316 in forum Excel General
    Replies: 1
    Last Post: 05-02-2013, 01:03 PM
  7. [SOLVED] Can I invert a table so row headings are now column headings etc
    By Sharon in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 02-10-2005, 04:06 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