Results 1 to 4 of 4
  1. #1
    3 Star Lounger
    Join Date
    Apr 2001
    Location
    London, Gtr London, England
    Posts
    357
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Selecting a Range (Excel 2000)

    Is there a way of specifying a range of cells in a row, say 5, to the right of the ActiveCell? Having done so I'd like to copy these in the row below.

    F

  2. #2
    Plutonium Lounger
    Join Date
    Nov 2001
    Posts
    10,550
    Thanks
    0
    Thanked 7 Times in 7 Posts

    Re: Selecting a Range (Excel 2000)

    I don't do Excel very often, but I think you just want something like
    <code>ActiveCell.Offset(1, 5) = ActiveCell.Offset(0, 5)</code>


    The first parameter is the row offset, the second is the column offset.

    StuartR

    Edited by StuartR to add
    If you meant that you want to copy all 5 cells to the right of the active cell then how about...
    <code>
    Dim i As Integer
    For i = 1 To 5
    ActiveCell.Offset(1, i) = ActiveCell.Offset(0, i)
    Next i
    End Sub
    </code>

  3. #3
    Uranium Lounger
    Join Date
    Dec 2000
    Location
    Salt Lake City, Utah, USA
    Posts
    9,508
    Thanks
    0
    Thanked 6 Times in 6 Posts

    Re: Selecting a Range (Excel 2000)

    An alternative to StuartR's:

    Range(ActiveCell, ActiveCell.Offset(1, 4)).FillDown
    -John ... I float in liquid gardens
    UTC -7ąDS

  4. #4
    3 Star Lounger
    Join Date
    Apr 2001
    Location
    London, Gtr London, England
    Posts
    357
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Selecting a Range (Excel 2000)

    Thank's - all adapted and works fine. Much appreciated.

    F

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •