+ Reply to Thread
Results 1 to 6 of 6

Marcro to copy range not entire column

  1. #1
    Registered User
    Join Date
    03-25-2012
    Location
    Melbourne, Victoria
    MS-Off Ver
    Excel 2007
    Posts
    82

    Marcro to copy range not entire column

    Im trying to re write this macro to copy from R1 to R200 not entire column R. This what I have so far!!

    Please Login or Register  to view this content.

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,162

    Re: Marcro to copy range not entire column

    I may be alone here, but I don't really understand what you are trying to do.

    To copy cells R1 to R200, you could use something like:

    Please Login or Register  to view this content.

    Regards, TMS
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Registered User
    Join Date
    03-25-2012
    Location
    Melbourne, Victoria
    MS-Off Ver
    Excel 2007
    Posts
    82

    Re: Marcro to copy range not entire column

    I have a workbook with Sheets 1 (Estimate) and Sheet 2 (Order) Im trying to auto fill in Sheet 2 at when a match appears in Sheet 1, I only want it to look in R1 to R200 but it is looking at the whole column.

  4. #4
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,162

    Re: Marcro to copy range not entire column

    That's probably because you determine and use the last row, LR.

    Just use:

    Please Login or Register  to view this content.

    Regards, TMS

  5. #5
    Registered User
    Join Date
    03-25-2012
    Location
    Melbourne, Victoria
    MS-Off Ver
    Excel 2007
    Posts
    82

    Re: Marcro to copy range not entire column

    Just to make this even harder what if Worksheet 1 (Estimate) was in 1 workbook and Worksheet 2 (Order) was in another can you run a macro from another workbook?

  6. #6
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,162

    Re: Marcro to copy range not entire column

    Why do you need to do that?

    Use a fully qualified reference ... not something I've had call to do.

    Regards, TMS

+ 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