+ Reply to Thread
Results 1 to 3 of 3

Macro failed to copy and paste data range

  1. #1
    Forum Contributor
    Join Date
    05-12-2009
    Location
    Hendersonville, TN
    MS-Off Ver
    Excel 2010
    Posts
    113

    Macro failed to copy and paste data range

    Greetings,

    I have been trying to find a macro that can copy a range of data (A2:Q2) from a worksheet and paste it to the next available row (A:Q) of a worksheet in a different workbook. I am trying to get the 2nd workbook to be a running log of entries pulled from the 1st workbook. Anyway, I have had no luck trying to rework some of the macros I have seen due to various types of errors I have be unable to debug.

    The code I am curently messing with acts like it is trying, but the desired data set doesn't make it to the 2nd workbook. I was hoping one of you all could give it a look and steer me down the right path. I know nothing of VBA and I have been looking for cookie-cutter solutions for my task.

    Please Login or Register  to view this content.
    Thank you for your time and assistance.

    Patrick
    Last edited by pjbassdc; 09-02-2011 at 07:38 PM.

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

    Re: Macro failed to copy and paste data range

    hi, Patrick, in order to get data selection that is in A:Q range and number of rows might be different, you can use the following code line provided data is filled equally in all columns:

    Please Login or Register  to view this content.
    So the first left upper cell is A1 and right bottom cell will be defined by going up till the first value is met.

    This part of your code:

    Please Login or Register  to view this content.
    do not select anything.

  3. #3
    Forum Contributor
    Join Date
    05-12-2009
    Location
    Hendersonville, TN
    MS-Off Ver
    Excel 2010
    Posts
    113

    Re: Macro failed to copy and paste data range

    Thanks for the reply...

    I did more looking and messing around with some of the ideas I had found elsewhere. This is the solution that ended up working for me.


    Please Login or Register  to view this content.
    Patrick

+ 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