+ Reply to Thread
Results 1 to 5 of 5

transpose column data to row data

  1. #1
    Registered User
    Join Date
    12-19-2010
    Location
    Texas, US
    MS-Off Ver
    Excel 2002
    Posts
    3

    transpose column data to row data

    Not a complete novice but a long way from where I want to be. Apologies for forum faux pax in advance.
    I have a large spreadsheet with all of the data in column A. The data is currently in a 1 column/5 row blocks. I need to write a macro that takes each 1 column/5 row block of data and transpose each 1 column/5 row block into a 5 column/1row block of data.
    I have attached a short sample of what I need to do with column A the current data format and columns B-F the desired data format. The spreadsheet has some 5000 rows in the current format.
    I tried searching in the forum for this question and it kept giving me the following error.:
    Fatal error: Allowed memory size of 100663296 bytes exhausted (tried to allocate 71 bytes) in /home/eforum/public_html/search.php on line 1155

    Thanks for any and all suggestions.
    DaveM
    Attached Files Attached Files
    Last edited by davem1901; 12-20-2010 at 09:33 AM. Reason: resolved

  2. #2
    Forum Expert mrice's Avatar
    Join Date
    06-22-2004
    Location
    Surrey, England
    MS-Off Ver
    Excel 2013
    Posts
    4,967

    Re: transpose column data to row data

    Try this macro

    Please Login or Register  to view this content.
    Open up the VBA editor by hitting ALT F11

    Insert a new module by hitting Insert - Module

    Paste the macro into the empty sheet

    Hit ALT F11 to get back to the worksheet.

    Run the macro by going to tools-macro in Excel 2003 or the view ribbon in Excel 2007.
    Martin

  3. #3
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,339

    Re: transpose column data to row data

    Something like:

    Please Login or Register  to view this content.

    Regards
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  4. #4
    Registered User
    Join Date
    12-19-2010
    Location
    Texas, US
    MS-Off Ver
    Excel 2002
    Posts
    3

    Re: transpose column data to row data

    Martin,
    Tried sending this before logging in, so want to make sure you got it. Can't thank you enough. Worked perfectly (once I got the errors in the data corrected.) Now I just have to go through it and see how you worked your magic.
    Right now, afraid all I can do is to wish you well in your marathon and that you are able to raise a ton of money through. I admire your efforts to do so.
    Dave Miller

  5. #5
    Registered User
    Join Date
    12-19-2010
    Location
    Texas, US
    MS-Off Ver
    Excel 2002
    Posts
    3

    Re: transpose column data to row data

    TM,
    Thanks for your reply. I have not tried it yet but do plan of trying it. The first reply did the trick. However, yours looks like it uses more traditional methods that may help me to understand how this is accomplished and this is why we are all here I presume. Thanks again.
    DaveM

+ 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