+ Reply to Thread
Results 1 to 9 of 9

VB code Macro needed to transpose data from columns to rows

  1. #1
    Forum Contributor
    Join Date
    03-15-2012
    Location
    Chicago, IL
    MS-Off Ver
    Excel 2010
    Posts
    149

    VB code Macro needed to transpose data from columns to rows

    I have a list of addresses and contact information. All I want is to transpose data from columns to rows step by step. Please see the attached file and screen shot (Before and After).

    Attachment 194293


    Eg: This is what I have

    Mkt cap ACC Address
    51.35B 12345 1635 W POINT POST LN
    Menlo Park 86302
    WYOMISSING, PA 196100000


    This is what I need

    Mkt cap ACC Address1 Address2 Address3 City State Zip Code
    51.35B 12345 1635 W POINT POST LN Menlo Park 86302 WYOMISSING PA 19610-0000

    Any help is appreciated Please let me know if you have any questions... Please help

    Thanks !
    Last edited by raw_geek; 11-17-2012 at 12:01 AM.

  2. #2
    Forum Contributor
    Join Date
    09-23-2008
    Location
    Mexico
    Posts
    200

    Re: VB code Macro needed to transpose data from columns to rows

    Check this post:
    http://www.excelforum.com/excel-prog...s-to-rows.html

  3. #3
    Forum Expert
    Join Date
    10-10-2008
    Location
    Northeast Pennsylvania, USA
    MS-Off Ver
    Excel 2007
    Posts
    2,387

    Re: VB code Macro needed to transpose data from columns to rows

    raw_geek,


    Please TEST this FIRST in a COPY of your workbook (always make a backup copy before trying new code, you never know what you might lose).

    1. Copy the below code, by highlighting the code and pressing the keys CTRL + C
    2. Open your workbook
    3. Press the keys ALT + F11 to open the Visual Basic Editor
    4. Press the keys ALT + I to activate the Insert menu
    5. Press M to insert a Standard Module
    6. Where the cursor is flashing, paste the code by pressing the keys CTRL + V
    7. Press the keys ALT + Q to exit the Editor, and return to Excel
    8. To run the macro from Excel, open the workbook, and press ALT + F8 to display the Run Macro Dialog. Double Click the macro's name to Run it.


    Please Login or Register  to view this content.

    Before you use the macro with Excel 2007 or newer, save your workbook, Save As, a macro enabled workbook with the file extension .xlsm


    Then run the ReorgData macro.
    Have a great day,
    Stan

    Windows 10, Excel 2007, on a PC.

    If you are satisfied with the solution(s) provided, please mark your thread as Solved by clicking EDIT in your original post, click GO ADVANCED and set the PREFIX box to SOLVED.

  4. #4
    Forum Contributor
    Join Date
    03-15-2012
    Location
    Chicago, IL
    MS-Off Ver
    Excel 2010
    Posts
    149

    Re: VB code Macro needed to transpose data from columns to rows

    WOW! WOW!! you made my day!! Great!! that's work. A BIG help on my project !!!

    Thanks! All.... thanks excelforum
    Last edited by raw_geek; 11-17-2012 at 12:29 AM.

  5. #5
    Forum Contributor
    Join Date
    03-15-2012
    Location
    Chicago, IL
    MS-Off Ver
    Excel 2010
    Posts
    149

    Re: VB code Macro needed to transpose data from columns to rows

    Quote Originally Posted by Armando Montes View Post
    thank you !

  6. #6
    Forum Expert
    Join Date
    10-10-2008
    Location
    Northeast Pennsylvania, USA
    MS-Off Ver
    Excel 2007
    Posts
    2,387

    Re: VB code Macro needed to transpose data from columns to rows

    raw_geek,

    Thanks for the feedback.

    You are very welcome. Glad I could help.

    Come back anytime.

  7. #7
    Forum Expert
    Join Date
    10-10-2008
    Location
    Northeast Pennsylvania, USA
    MS-Off Ver
    Excel 2007
    Posts
    2,387

    Re: VB code Macro needed to transpose data from columns to rows

    raw_geek,

    Per your Private Message request. In the future please put all additional requests in the original post.


    Please TEST this FIRST in a COPY of your workbook (always make a backup copy before trying new code, you never know what you might lose).


    Please Login or Register  to view this content.

    Before you use the macro with Excel 2007 or newer, save your workbook, Save As, a macro enabled workbook with the file extension .xlsm


    Then run the ReorgDataV2 macro.

  8. #8
    Forum Contributor
    Join Date
    03-15-2012
    Location
    Chicago, IL
    MS-Off Ver
    Excel 2010
    Posts
    149

    Re: VB code Macro needed to transpose data from columns to rows

    thanks! you are awesome.......

  9. #9
    Forum Expert
    Join Date
    10-10-2008
    Location
    Northeast Pennsylvania, USA
    MS-Off Ver
    Excel 2007
    Posts
    2,387

    Re: VB code Macro needed to transpose data from columns to rows

    raw_geek,

    Thanks for the feedback.

    You are very welcome. Glad I could help.

    Come back anytime, and, please - no more Private Messages.

+ 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