+ Reply to Thread
Results 1 to 4 of 4

macro for turning columns into rows

  1. #1
    Registered User
    Join Date
    03-11-2013
    Location
    Ireland
    MS-Off Ver
    Excel 2007
    Posts
    7

    macro for turning columns into rows

    hey I was hoping someone could help me with a macro. I have uploaded a rather large set of data in an excel spreadsheet, and wanted to turn the spreadsheet from a table into a list. In the spreadsheet just to the right of the data I have the format. If someone could help me put this together I would greatly appreciate it!

    Thanks
    s
    Attached Files Attached Files
    Last edited by Shanehickey2497; 03-18-2013 at 02:59 AM.

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

    Re: macro trouble

    Please Login or Register  to view this content.

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

    Re: macro trouble

    Shanehickey2497,

    Thanks for the workbook.

    The following macro will process your raw data in Sheet1, beginning in cell B4, range B4:G977, to the last column to the right + 2, range I4:I5847, in 0.016 seconds.

    The macro will adjust for the varying rows and columns.

    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 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 arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,167

    Re: macro trouble

    Please take a moment to read the forum rules and then amend your thread title to something descriptive of your problem. Once you have done this please send me a PM and I will remove this request.

    To change a Title on your post, click EDIT then Go Advanced and change your title, if 2 days have passed ask a moderator to do it for you.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

+ 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