+ Reply to Thread
Results 1 to 2 of 2

Copy Range with Variable

  1. #1
    Forum Contributor
    Join Date
    09-25-2012
    Location
    Ventura, united States
    MS-Off Ver
    Excel 2010
    Posts
    346

    Copy Range with Variable

    I'm trying to copy to a range using several variables. This is supposed to copy to the first empty cell in Column A, but depending on the variable REPEAT it may need to copy to several cells below as well.


    Please Login or Register  to view this content.
    This does not work

  2. #2
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,598

    Re: Copy Range with Variable

    I don't understand what you are trying to do.

    You said: "This is supposed to copy to the first empty cell in Column A..." which means (to me) that you want to start at the top of column A and go down one row past the first empty cell to include it in the copy range, though I don't know why you want to do that. However, the code: Cells(Row, 1).Copy only copies a single cell.

    The remainder of the line, starting with "Sheets( ..." is the destination into which to paste the copied data.
    So, please explain exactly what you are trying to copy and the destination where it should be pasted.
    Ben Van Johnson

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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