Results 1 to 7 of 7

Range for activecell.offset

Threaded View

  1. #1
    Registered User
    Join Date
    09-16-2010
    Location
    Glasgow
    MS-Off Ver
    2010
    Posts
    68

    Range for activecell.offset

    I normally use the following statement to copy the second cell located to the right of the found cell back into the original worksheet:

    AtiveCell.Offset(0, 2).Select
    ActiveCell.Copy
    
    Worksheets("Tab1").Select
    ActiveSheet.Cells(l, 7).Activate
    ActiveCell.PasteSpecial
    The above works fine. However I would like to use a range instead, i.e.I would like to copy the second, third and fourth cell located to the right of the found cell. I used the following:

    Range(ActiveCell.Offset(0, 2), ActiveCell.Offset(0, 4)).Select
    ActiveCell.Copy
    
    Worksheets("Tab1").Select
    ActiveSheet.Cells(l, 7).Activate
    ActiveCell.PasteSpecial
    However the above does exactly the same as the first macro? Any ideas why?

    PS: what should I use to copy and paste the 2nd, 3rd and 5th cells to the right in one go?

    Thanks,
    Antoine
    Attached Files Attached Files
    Last edited by Folshot; 05-10-2011 at 04:35 AM. Reason: SOLVED

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