Results 1 to 2 of 2
  1. #1
    Bronze Lounger
    Join Date
    Feb 2008
    Posts
    1,422
    Thanks
    125
    Thanked 5 Times in 5 Posts

    Copy Data from One Col to another

    I have data in Col G from row 3 onwards. I would like VBA code to copy this data and the Paste special Values in Col C from row 3 onwards, but to ignore copying the data where the formula =sum appears. The data to be copied and to be pated using Paste Special Values contains the formula = Vlookup

    I have the following code to do this. Is there a more efficient way to do this?

    Sub Copy_Data()

    With Range("F3:F8")
    .Copy
    End With

    With Range("C3")
    .PasteSpecial Paste:=xlPasteValues
    End With
    With Range("F16:F21")
    .Copy
    End With
    With Range("C16")
    .PasteSpecial Paste:=xlPasteValues
    End With

    End Sub



    Your assistance is most appreciated

    http://www.mrexcel.com/forum/excel-q...l-another.html

  2. #2
    WS Lounge VIP sdckapr's Avatar
    Join Date
    Jul 2002
    Location
    Pittsburgh, Pennsylvania, USA
    Posts
    11,225
    Thanks
    14
    Thanked 342 Times in 335 Posts

Posting Permissions

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