+ Reply to Thread
Results 1 to 7 of 7

VBA Copy Paste Transpose Loop (Multiple Sheets)

  1. #1
    Registered User
    Join Date
    02-26-2009
    Location
    Australia
    MS-Off Ver
    Office 365
    Posts
    64

    VBA Copy Paste Transpose Loop (Multiple Sheets)

    Hello All,

    I have annotated the below code as I believe it might be a better explanation as to what I would like my file to do.

    Please Login or Register  to view this content.
    Thanks in advance.

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: VBA Copy Paste Transpose Loop (Multiple Sheets)

    Like so, but I get an error still because "report_pages" is not a filled variable, I assume you have the done another way:

    Please Login or Register  to view this content.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Registered User
    Join Date
    02-26-2009
    Location
    Australia
    MS-Off Ver
    Office 365
    Posts
    64

    Re: VBA Copy Paste Transpose Loop (Multiple Sheets)

    Thanks for your help, I get this error message when I run the code.

    Image 1.png

  4. #4
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: VBA Copy Paste Transpose Loop (Multiple Sheets)

    Apologies, forgot to close the WITH section:
    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    02-26-2009
    Location
    Australia
    MS-Off Ver
    Office 365
    Posts
    64

    Re: VBA Copy Paste Transpose Loop (Multiple Sheets)

    Ahhh ok almost.

    A quick explanation as to how my file works, the copy paste tranpose part of the macro is basically collecting 1 or 2 ID numbers and dropping them into the display sheet (Measure Overview). These two numbers drive the information that appears on this sheet At this point I need the macro to PDF the Measure Overiview page before it goes to the next copy and paste loop.

    The copy paste transpose part of the macro has to be pasted into cell S2 (Measure Overview) each time. I think VBA above is copying the data into S2 then T2 then U2 etc and then PDFing which is not quite what I want.

  6. #6
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: VBA Copy Paste Transpose Loop (Multiple Sheets)

    Quote Originally Posted by demon8991 View Post
    I think VBA above is copying the data into S2 then T2 then U2 etc and then PDFing which is not quite what I want.
    What makes you think that? When tested, did it do that? Your paste command is targeted at S2 only.

    Your paste command does include "Transpose=True" which may not be what you really want, but it was there originally, I simply left it there.
    Last edited by JBeaucaire; 10-30-2013 at 10:22 AM.

  7. #7
    Registered User
    Join Date
    02-26-2009
    Location
    Australia
    MS-Off Ver
    Office 365
    Posts
    64

    Re: VBA Copy Paste Transpose Loop (Multiple Sheets)

    Sorry for the late reply I have now solved this issue and added some more features with the below code.

    Thanks for your help, much appreciated.

    Please Login or Register  to view this content.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 5
    Last Post: 05-25-2013, 07:12 AM
  2. [SOLVED] vba copy and paste based on multiple loop criteria
    By sarahcpa in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 04-19-2013, 10:29 AM
  3. find copy paste loop multiple results
    By MTB1 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-19-2012, 10:53 AM
  4. [SOLVED] Loop, Find, Copy, and Paste between multiple worksheets
    By bg_enigma1 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 06-07-2012, 06:40 PM
  5. Loop to Copy and Paste and Transpose
    By o4008 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-08-2010, 02:11 PM

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