Results 1 to 11 of 11
  1. #1
    Star Lounger
    Join Date
    Oct 2003
    Posts
    82
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Copy Paste Everyother Cell (Excel 2003)

    Hello,
    Can some one please help me with a simple macro? I am trying to copy what is in cell G2 (text) to every other cell all the way to cell G1009. attached is a smaller version of the data that I am working with.
    Thank you,
    Aluis

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

    Re: Copy Paste Everyother Cell (Excel 2003)

    Select G2. Right click on the fill handle (the little square in the lower right corner of the cell) and drag down as far as you want to copy. Release the right button, and in the popup menu click on Copy Cells.
    Legare Coleman

  3. #3
    Star Lounger
    Join Date
    Oct 2003
    Posts
    82
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Copy Paste Everyother Cell (Excel 2003)

    Hi maybe I was not specific enough. By doing what you suggested I am writing over the data that is in btwn (PTGxxxx) .

    Attached is a sample (see After tab) of what I am trying to do.

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Copy Paste Everyother Cell (Excel 2003)

    Try this macro:

    Sub DupDown()
    Dim n As Long
    For n = 4 To 1008 Step 2
    Range("G" & n) = Range("G2")
    Next n
    End Sub

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

    Re: Copy Paste Everyother Cell (Excel 2003)

    No, you were specific enough, I just didn't read it correctly. <img src=/S/blush.gif border=0 alt=blush width=15 height=15>

    Try the macro below. This macro assumes you want to stop at cell G1008. If you want to stop at the cell above/below the last cell containing a value, that can easily be done also.

    <code>
    Option Explicit

    Public Sub CopyEveryOther()
    Dim I As Long
    Range("G2").Copy
    For I = 3 To 1008 Step 2
    ActiveSheet.Paste Destination:=Range("G1").Offset(I, 0)
    Next I
    End Sub
    </code>
    Legare Coleman

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

    Re: Copy Paste Everyother Cell (Excel 2003)

    In XL2K, that converts the text value to a numeric value.
    Legare Coleman

  7. #7
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Copy Paste Everyother Cell (Excel 2003)

    Excel 2002 (and I presume Excel 2003) keeps the text value, but displays a smart tag warning that the cells contain numbers stored as text, with an option to convert them to numbers.

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

    Re: Copy Paste Everyother Cell (Excel 2003)

    Since the OP said he had 2003, then either of our solutions should work for him.
    Legare Coleman

  9. #9
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Copy Paste Everyother Cell (Excel 2003)

    Yep - l

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

    Re: Copy Paste Everyother Cell (Excel 2003)

    Oui <img src=/S/grin.gif border=0 alt=grin width=15 height=15>
    Legare Coleman

  11. #11
    WS Lounge VIP rory's Avatar
    Join Date
    Dec 2000
    Location
    Burwash, East Sussex, United Kingdom
    Posts
    6,280
    Thanks
    3
    Thanked 191 Times in 177 Posts

    Re: Copy Paste Everyother Cell (Excel 2003)

    Aluis,
    You already have the macro answer to this, but it's actually quite straightforward to do manually too:
    Copy G2 to N2
    Select N2:N3
    Right-click on the little black box at the bottom right corner of N3, hold and drag down to N1008. Then release and choose Copy Cells form the shortcut menu.
    Copy N2:N1008
    Select G2, choose Paste Special, select All and Skip Blanks.
    Delete N2:N1008.

    Regards,
    Rory
    Regards,
    Rory

    Microsoft MVP - Excel

Posting Permissions

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