+ Reply to Thread
Results 1 to 8 of 8

Excel code to represent data from row wise to column wise

  1. #1
    Registered User
    Join Date
    09-25-2012
    Location
    abu dhabi
    MS-Off Ver
    Excel 2010
    Posts
    28

    Excel code to represent data from row wise to column wise

    Hi,

    I am having data in two columns as below

    column1 column2
    top level sub level
    a a1
    a a2
    a a3
    a a4
    b b1
    b b2
    b b3
    b b4
    b b5

    now i need the data to get represented column wise as below. Since the data is huge VBA code would be appropriate.

    column1 column2 column3 column4 column5 coumn6
    Top level Sub level Sub level Sub level Sub level Sub level
    a a1 a2 a3 a4
    b b1 b2 b3 b4 b5


    regards
    Sreejesh

  2. #2
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: Excel code to represent data from row wise to column wise

    Please attach a sample workbook with enough data to make it clear what is needed. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are demonstrated, mock them up manually if needed. Remember to desensitize the data.

    Click on GO ADVANCED and use the paperclip icon to open the upload window.

    View Pic

    Note: Please don't attach documents containing confidential data like (address, telephone, ID#s, etc.).


    If your problem is solved, then please mark the thread as SOLVED>>Above your first post>>Thread Tools>>
    Mark your thread as Solved


    If the suggestion helps you, then Click *below to Add Reputation

  3. #3
    Registered User
    Join Date
    09-25-2012
    Location
    abu dhabi
    MS-Off Ver
    Excel 2010
    Posts
    28

    Re: Excel code to represent data from row wise to column wise

    Sample file attached..
    Attached Files Attached Files

  4. #4
    Valued Forum Contributor
    Join Date
    02-08-2012
    Location
    Newcastle, Australia
    MS-Off Ver
    Excel 2007 and Excel 2010
    Posts
    1,429

    Re: Excel code to represent data from row wise to column wise

    Hi,

    Here is some code that will transpose your 2 columns (not including the headings - if you need the headings done too, let me know and I'll amend my code for you).

    Try placing a button (called "CommandButton1") on the worksheet that you are referring to in your original post, and place this code in the click event for that button (make sure you correctly specify the first and last rows that you want transposed):
    Please Login or Register  to view this content.
    This should do what you're asking (hopefully). If not let me know what isn't right about it.

    Once you have completed the transposition, you can delete the button and this code, as it won't be needed any longer.

    Hope this helps

  5. #5
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: Excel code to represent data from row wise to column wise

    Looking for formula solution or code solution?

  6. #6
    Valued Forum Contributor
    Join Date
    02-08-2012
    Location
    Newcastle, Australia
    MS-Off Ver
    Excel 2007 and Excel 2010
    Posts
    1,429

    Re: Excel code to represent data from row wise to column wise

    I would be mighty impressed if you could come up with a formula solution to this one

  7. #7
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: Excel code to represent data from row wise to column wise

    In F2 Cell - Array Formula - Requires CTRL+SHIFT+ENTER
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Drag it down...

    In G2 Cell - Array Formula - Requires CTRL+SHIFT+ENTER
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Drag it down and right...

    Array formulas need to be entered using the key combination of CTRL,SHIFT,ENTER (not just ENTER). Hold down both the CTRL key and the SHIFT key then hit ENTER.

  8. #8
    Registered User
    Join Date
    09-25-2012
    Location
    abu dhabi
    MS-Off Ver
    Excel 2010
    Posts
    28

    Re: Excel code to represent data from row wise to column wise

    Thanks very much.. the code the working perfect...

  9. #9
    Valued Forum Contributor
    Join Date
    02-08-2012
    Location
    Newcastle, Australia
    MS-Off Ver
    Excel 2007 and Excel 2010
    Posts
    1,429

    Re: Excel code to represent data from row wise to column wise

    No problems!

    Don't forget to add some reputation...

    Glad to help

+ 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. Search Function, ROW WISE Results to COLUMN WISE Results
    By juanl in forum Excel Programming / VBA / Macros
    Replies: 16
    Last Post: 06-27-2013, 04:07 AM
  2. [SOLVED] I want change the data row wise to coloum wise & coloumn wise to row wise.
    By satputenandkumar0 in forum Excel General
    Replies: 3
    Last Post: 12-20-2012, 08:34 AM
  3. Replies: 4
    Last Post: 08-01-2012, 09:50 AM
  4. Data row wise, formula column wise
    By Fred Smith in forum Excel General
    Replies: 4
    Last Post: 12-09-2005, 11:55 AM
  5. Delete row wise duplicates & colomun wise simultaneously excel
    By Dipankar in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 10-06-2005, 09:05 AM

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