+ Reply to Thread
Results 1 to 6 of 6

Paste copied data in rows not columns

  1. #1
    Forum Contributor
    Join Date
    05-23-2014
    Location
    Fredericia, Denmark
    MS-Off Ver
    Windows Office 2013, Excel 10
    Posts
    139

    Paste copied data in rows not columns

    I copied the code below to extract data from workbooks in a folder into a "master" workbook sheetfile titled "Summary". It works fine except, I need it to paste the captured data ranges in rows (vertically) instead of columns (side by side). In the "CopyData sub" I tried several times replacing "Col" or "Columns" with "Row" or "Rows, and "xlToLeft" with "either "xlUp" or "xlDown", all with the same 1004 error message, with this row highlighted:

    HTML Code: 
    Here is the code:

    HTML Code: 
    Thanks for any help you can give. I think I'm close to a working solution,but I'm stumped .... David

  2. #2
    Forum Expert
    Join Date
    10-10-2016
    Location
    Sheffield
    MS-Off Ver
    365 and rarely 2016
    Posts
    3,210

    Re: Paste copied data in rows not columns

    You need to choose the transpose option in the paste special perhaps something like

    Please Login or Register  to view this content.
    Regards

    Dav

  3. #3
    Forum Contributor
    Join Date
    05-23-2014
    Location
    Fredericia, Denmark
    MS-Off Ver
    Windows Office 2013, Excel 10
    Posts
    139

    Re: Paste copied data in rows not columns

    Hi Dav, thanks for the quick response. I tried your suggestion but it still comes out with ranges pasted next to each other. Any other thoughts?

  4. #4
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2404 Win 11 Home 64 Bit
    Posts
    23,860

    Re: Paste copied data in rows not columns

    It would be very helpful if you uploaded a sample worksheet with data showing what you have and what you expect. In this manner, we can provide you with specific code for your worksheet.
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  5. #5
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2404 Win 11 Home 64 Bit
    Posts
    23,860

    Re: Paste copied data in rows not columns

    It would be very helpful if you uploaded a sample worksheet with data showing what you have and what you expect. In this manner, we can provide you with specific code for your worksheet.

  6. #6
    Forum Expert
    Join Date
    10-10-2016
    Location
    Sheffield
    MS-Off Ver
    365 and rarely 2016
    Posts
    3,210

    Re: Paste copied data in rows not columns

    I agree that an example would be more helpful and your initial request was about the pasting. I would put some stops in the code, open the local window and step through. It is not entirely clear what you are asking for

+ 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. Automatically paste copied data
    By mailosid in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-05-2016, 06:42 AM
  2. can't Paste Copied Range into individual merged rows cells on another workbook
    By lougs7 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-29-2015, 03:54 PM
  3. [SOLVED] Change VBA to insert copied rows not paste them.
    By baby_kay_2003 in forum Excel Programming / VBA / Macros
    Replies: 15
    Last Post: 10-09-2014, 02:08 AM
  4. Bunch of data to be copied and paste
    By gan_xl in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-12-2013, 07:49 AM
  5. Replies: 0
    Last Post: 03-23-2012, 05:59 PM
  6. Replies: 2
    Last Post: 02-22-2011, 02:07 AM
  7. Increment Rows Across Columns in copied SUMIF formula??
    By Chizilla in forum Excel General
    Replies: 3
    Last Post: 02-10-2010, 05:56 PM

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