+ Reply to Thread
Results 1 to 5 of 5

macro to change rows to columns

Hybrid View

  1. #1
    Registered User
    Join Date
    02-04-2011
    Location
    Uhmurika
    MS-Off Ver
    Excel 2003
    Posts
    3

    Red face macro to change rows to columns

    I'm new to excel. I made a form in word that I wanted to import into excel. I end up having hundreds of these forms filled out but they are all in one word document with each form being one page.

    When I try to import it into excel as a .txt file it imports fine but it is all on one row. Each form has 20 form values so I need to find a way to make a new row for every 20 columns. Can this be done with a macro, or do I have to cut this one word doc into 500 separate word docs?

    Thanks
    Last edited by faptronic; 02-04-2011 at 05:45 PM.

  2. #2
    Valued Forum Contributor
    Join Date
    09-21-2003
    Location
    British Columbia , Canada
    MS-Off Ver
    03,07,10,13
    Posts
    727

    Re: macro to change rows to columns

    Have you tried using the pastespecial function "Transpose" ? It takes the selected rows and changes them to columns ... and visa/versa.

  3. #3
    Registered User
    Join Date
    02-04-2011
    Location
    Uhmurika
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: macro to change rows to columns

    Quote Originally Posted by nimrod View Post
    Have you tried using the pastespecial function "Transpose" ? It takes the selected rows and changes them to columns ... and visa/versa.
    I think I may have explained my problem poorly originally. My problem is I have only one long row that I want to change into several rows. I need every 20 cells in this one row to be on a new row. I'm stuck...

    Thanks

  4. #4
    Forum Expert
    Join Date
    11-29-2010
    Location
    Ukraine
    MS-Off Ver
    Excel 2019
    Posts
    4,168

    Re: macro to change rows to columns

    posting txt file would be helpful

  5. #5
    Registered User
    Join Date
    02-04-2011
    Location
    Uhmurika
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: macro to change rows to columns

    This is an example of the form template I am using from word and the .txt. This example is just 3 pages and I need to import it into excel with each page being its own row.

    I know I can just save one page at a time but i may have up to 1000+ pages eventually and to save each file individually would be a big hassle.

    Every page has 20 form values. The particular word doc I'm trying to import atm is 84 pages. So that is 1680 cells occupied all in one row. I could scroll every 20 cells and cut n paste to the next row, but hopefully there is a better way.

    Thanks
    Attached Files Attached Files
    Last edited by faptronic; 02-07-2011 at 11:04 AM.

+ 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