+ Reply to Thread
Results 1 to 2 of 2

Offsetting Cells

  1. #1
    Registered User
    Join Date
    06-13-2005
    Posts
    21

    Offsetting Cells

    What I'm trying to do is copy a range of cells and paste it through out my worksheet. For instance, suppose I select and copy A1:C4, how would then select the A5:C8 using VBA in order to paste the copied cells? Can I use some variation of the Offset command?

  2. #2
    Jim Thomlinson
    Guest

    RE: Offsetting Cells

    You can try this... Copies a range and pastes it four columns to the left...

    Public Sub CopyRange()
    Dim rng As Range

    Set rng = ActiveSheet.Range("A1", "C4")

    rng.Copy rng.Offset(0, 4)
    End Sub
    --
    HTH...

    Jim Thomlinson


    "PGalla06" wrote:

    >
    > What I'm trying to do is copy a range of cells and paste it through out
    > my worksheet. For instance, suppose I select and copy A1:C4, how would
    > then select the A5:C8 using VBA in order to paste the copied cells? Can
    > I use some variation of the Offset command?
    >
    >
    > --
    > PGalla06
    > ------------------------------------------------------------------------
    > PGalla06's Profile: http://www.excelforum.com/member.php...o&userid=24260
    > View this thread: http://www.excelforum.com/showthread...hreadid=378690
    >
    >


+ 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