+ Reply to Thread
Results 1 to 13 of 13

transpose Rows to column

  1. #1
    Registered User
    Join Date
    05-01-2007
    Location
    Lancashire, England
    Posts
    20

    transpose Rows to column

    Wow this is just what I'm after guys. Got a problem where I'm trying to set out a customer database. I've got about 40 columns and need to have this information printed off on one sheet of paper. So I need the column headers and then each line of information to run in two columns. I've been messing with the code that was kindly posted earlier but to be honest I haven't got a clue what I'm doing and I know my pc is laughing at me.
    I've attached a sample spreadsheet (excel 2003) to show you what I'm trying to do, with the details to be entered into the MAIN worksheet, and to be printed off from the PRINT worksheet.
    If anyone could briefly explain (or point me in the right direction) of how to set this up with the macro I'd be really grateful.
    Thanks,
    Gareth

    p.s. sorry if this should have been a new thread.
    Attached Files Attached Files
    Last edited by gcol; 03-01-2011 at 04:58 PM.

  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 Rows to column

    Does your first sheet contain multiple rows of data and if so, how would these appear on the second sheet. Is it stacked below with a page break between each set?
    Martin

  3. #3
    Valued Forum Contributor
    Join Date
    02-12-2011
    Location
    The Netherlands
    MS-Off Ver
    365
    Posts
    818

    Re: transpose Rows to column

    It’s a start.

    Run the code in Sheets 'MAIN'..

    Please Login or Register  to view this content.
    If the code is good, change Range("C1") in Range("A1")
    Last edited by HSV; 02-27-2011 at 06:20 PM. Reason: It’s a start.
    Kind regards, Harry.

  4. #4
    Registered User
    Join Date
    05-01-2007
    Location
    Lancashire, England
    Posts
    20

    Re: transpose Rows to column

    Quote Originally Posted by mrice View Post
    Does your first sheet contain multiple rows of data and if so, how would these appear on the second sheet. Is it stacked below with a page break between each set?
    Hi, yes there are many rows of data and you're right again that they'll need to be stacked on the second sheet with a page break.

    Basically what it I need to do is at any time be able to sort the first MAIN sheet by the Service Date Month so that all the customers are listed by the month in which they require a service; run the macro to copy the sorted list to the PRINT sheet, then print off the pages that relate to the month I want.

  5. #5
    Registered User
    Join Date
    05-01-2007
    Location
    Lancashire, England
    Posts
    20

    Re: transpose Rows to column

    Quote Originally Posted by HSV View Post
    It’s a start.

    Run the code in Sheets 'MAIN'..

    Please Login or Register  to view this content.
    If the code is good, change Range("C1") in Range("A1")
    Okay thanks for this, we're on the right track. I managed to get the code in, change to A1 like you said, run the macro and it put the headings vertically like I wanted. I've added some spaces to the headings to make it clearer when it's printed and it still works. Okay so I added a few rows of information but the information does not appear on the PRINT sheet. See attached. Any ideas?

    Thanks,
    Gareth
    Attached Files Attached Files

  6. #6
    Valued Forum Contributor
    Join Date
    02-12-2011
    Location
    The Netherlands
    MS-Off Ver
    365
    Posts
    818

    Re: transpose Rows to column

    Gareth,

    Something like attached file?
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    05-01-2007
    Location
    Lancashire, England
    Posts
    20

    Re: transpose Rows to column

    Quote Originally Posted by HSV View Post
    Gareth,

    Something like attached file?
    Hi, HSV, thanks but no, not like that. I have attached what I need. I can't have the PRINT spreadsheet the way you have it because I am limited to 256 columns. That would limit the number of customer records I can have.

    Thanks again,
    Gareth
    Attached Files Attached Files

  8. #8
    Valued Forum Contributor
    Join Date
    02-12-2011
    Location
    The Netherlands
    MS-Off Ver
    365
    Posts
    818

    Re: transpose Rows to column

    Now am i on the right track?
    Attached Files Attached Files

  9. #9
    Registered User
    Join Date
    05-01-2007
    Location
    Lancashire, England
    Posts
    20

    Re: transpose Rows to column

    Quote Originally Posted by HSV View Post
    Now am i on the right track?

    Yes that's it. Just one small thing and it'll be perfect. When you run the macro and it moves the information to the PRINT sheet, it puts in an extra row at the top of the sheet which throws the prints out by a line. I know I can just delete the line but if it's easy enough to have the information start one row up it'd be perfect. Thanks HSV, it's amazing what you guys know. I look at the macro code and just smile to myself because it's all so clever.
    Gareth

  10. #10
    Valued Forum Contributor
    Join Date
    02-12-2011
    Location
    The Netherlands
    MS-Off Ver
    365
    Posts
    818

    Re: transpose Rows to column

    Gareth,

    Glad to hear.

    Add the second line in the code like this.

    Please Login or Register  to view this content.

  11. #11
    Registered User
    Join Date
    05-01-2007
    Location
    Lancashire, England
    Posts
    20

    Re: transpose Rows to column

    Quote Originally Posted by HSV View Post
    Gareth,

    Glad to hear.

    Add the second line in the code like this.

    Please Login or Register  to view this content.
    HSV is my hero.

    HSV I want you to know I really appreciate all you've done on this. I'm very impressed. I'm not sure what I can ever do to repay you, but I'm based in the North West of England and have just started a fire protection company - if you think of a favour I can ever do for you, just ask.
    Thanks, Gareth

  12. #12
    Valued Forum Contributor
    Join Date
    02-12-2011
    Location
    The Netherlands
    MS-Off Ver
    365
    Posts
    818

    Re: transpose Rows to column

    Quote Originally Posted by gcol View Post
    HSV is my hero.

    Thanks, Gareth
    That’s enough Gareth

  13. #13
    Registered User
    Join Date
    05-01-2007
    Location
    Lancashire, England
    Posts
    20

    Re: transpose Rows to column

    Quote Originally Posted by HSV View Post
    That’s enough Gareth
    I hear you, but still, thanks.

+ 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