+ Reply to Thread
Results 1 to 11 of 11

Copy & Paste Entire Range

  1. #1
    Registered User
    Join Date
    12-04-2018
    Location
    Chicago
    MS-Off Ver
    2010
    Posts
    28

    Copy & Paste Entire Range

    Hello All,

    I created this snippet of code to copy a column from sheet 2 and paste it into sheet 3. Sheet 2 column B has roughly 3015 rows (Minus Header), possibly more daily, I want to paste this into sheet 3 starting at A2, it keeps giving me an error. Any thoughts?
    Please Login or Register  to view this content.

  2. #2
    Registered User
    Join Date
    06-06-2017
    Location
    Illinois
    MS-Off Ver
    Excel 2016
    Posts
    25

    Re: Copy & Paste Entire Range

    What error is this giving you? When I try and run this in my own test file it works without issue.

  3. #3
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,097

    Re: Copy & Paste Entire Range

    Try
    Please Login or Register  to view this content.
    You need to qualify all the ranges, not just the first one.

    Or slightly simpler
    Please Login or Register  to view this content.

  4. #4
    Registered User
    Join Date
    12-04-2018
    Location
    Chicago
    MS-Off Ver
    2010
    Posts
    28

    Re: Copy & Paste Entire Range

    Im getting Run time Error 1004. I am including a version of the test file I am working with.
    Attached Files Attached Files

  5. #5
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,097

    Re: Copy & Paste Entire Range

    That sheet has nothing in col B of sheet2

  6. #6
    Registered User
    Join Date
    06-06-2017
    Location
    Illinois
    MS-Off Ver
    Excel 2016
    Posts
    25

    Re: Copy & Paste Entire Range

    Column B is empty, maybe that's it. But once again, when I ran it, I didn't get any errors.

  7. #7
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,097

    Re: Copy & Paste Entire Range

    Quote Originally Posted by Moragtao View Post
    when I ran it, I didn't get any errors.
    That's probably because sheet2 was the active sheet. If any other sheet is active you will get an error.

  8. #8
    Registered User
    Join Date
    12-04-2018
    Location
    Chicago
    MS-Off Ver
    2010
    Posts
    28

    Re: Copy & Paste Entire Range

    Odd, really odd. All of a sudden it began to work...who knows.

  9. #9
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,097

    Re: Copy & Paste Entire Range

    Your code will work if Sheet2 is the active sheet, if it's not it will fail!
    Did you see my suggestions in post#3?

  10. #10
    Registered User
    Join Date
    12-04-2018
    Location
    Chicago
    MS-Off Ver
    2010
    Posts
    28

    Re: Copy & Paste Entire Range

    Yup! Thats what I used.

  11. #11
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,097

    Re: Copy & Paste Entire Range

    Glad it works & thanks for the feedback

+ 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. Filter range, copy range (not entire column), paste in another worksheet
    By LukeNZ in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-21-2018, 08:28 AM
  2. [SOLVED] Copy & paste an entire row
    By backyardfun in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-05-2014, 04:02 PM
  3. [SOLVED] Copy and paste entire row if certain cell contains X
    By MeerkatMatt in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 10-30-2013, 12:22 PM
  4. Copy and Paste Row grouping without copy+paste entire row
    By mikeTRON in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 07-03-2013, 12:22 AM
  5. Search for specific date range, copy entire row and paste to new worksheet
    By turias in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-04-2013, 03:57 PM
  6. vba to copy an entire row or a range and paste values to next available row
    By bouncer84 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-22-2012, 04:56 AM
  7. Copy paste entire row between worksheets
    By keith156 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-29-2009, 11:14 AM

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