+ Reply to Thread
Results 1 to 10 of 10

Transpose column to row

  1. #1
    Registered User
    Join Date
    03-12-2013
    Location
    Moldova
    MS-Off Ver
    Excel 2007
    Posts
    5

    Transpose column to row

    Hi All

    I have the following Excel file

    QQ COL1 COL2
    q1 1 45
    q1 2 45
    q1 3 45
    q1 4 4234
    q2 10 2
    q2 20 12
    q2 30 3
    q2 40 5

    I want to transpose the columns in the following order, grouped by QQ field. So I need the following result:

    q1 q2
    col1 col2 col1 col2
    1 45 10 2
    2 45 20 12
    3 45 30 3
    4 4234 40 5

    How can I obtain such result?

  2. #2
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Transpose column to row

    dgutu,
    It is diffcult see the result on text format. Could you please upload a sample book? Go to advance-then attachment

  3. #3
    Registered User
    Join Date
    03-12-2013
    Location
    Moldova
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: Transpose column to row

    thanks AB33
    attached is xls file. sheet1 is the initial data. sheet2 is expected result.
    Attached Files Attached Files

  4. #4
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Transpose column to row

    Result on attached sheet2
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    03-12-2013
    Location
    Moldova
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: Transpose column to row

    AB33, not understand exactly. Sorry, but I don't see any formulas or vb scripts. Could you please double check?

  6. #6
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Transpose column to row

    Well, there is a code on the attached and result is on sheet2. You can compare my sheet 2 with yours.

  7. #7
    Registered User
    Join Date
    03-12-2013
    Location
    Moldova
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: Transpose column to row

    Quote Originally Posted by AB33 View Post
    Well, there is a code on the attached and result is on sheet2. You can compare my sheet 2 with yours.
    yes the result is good, sheet2 is same as sheet2(2). to be honest but there is no code in excel. could you please tell me how can i find it?

  8. #8
    Registered User
    Join Date
    03-08-2013
    Location
    New York
    MS-Off Ver
    Excel 2010
    Posts
    19

    Re: Transpose column to row

    go to sheet 1, right click on that and click view code

    at the left hand side, cleck on module 1, you will see the code

  9. #9
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Transpose column to row

    While at excel, go to developer tab- then click visual basics and should be able to see module 1. To run it press F5 while you are in module 1.

    Or

    ALt plus F11 will also take you to VBA project. There is only one module

  10. #10
    Registered User
    Join Date
    03-12-2013
    Location
    Moldova
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: Transpose column to row

    got it Thank you for help

+ 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