Results 1 to 2 of 2
  1. #1
    New Lounger
    Join Date
    Feb 2005
    Posts
    12
    Thanks
    0
    Thanked 0 Times in 0 Posts

    multi selection (Excel)

    How to make a code to select and copy cells A1,D1,G1,J1....(all the way in the data range)? I've tried using macro recorder, but it didnt work. Thank you.

  2. #2
    Uranium Lounger
    Join Date
    Jan 2001
    Location
    South Carolina, USA
    Posts
    7,295
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: multi selection (Excel)

    Something like this:

    <pre>Dim oCpyRng As Range, J As Long
    Set oCpyRng = ActiveSheet.Range("A1")
    For J = 3 To 256 Step 3
    Set oCpyRng = Union(oCpyRng, Range("A1").Offset(0, J))
    Next J
    oCpyRng.Copy
    </pre>

    Legare Coleman

Posting Permissions

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