View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Justin Philips Justin Philips is offline
external usenet poster
 
Posts: 32
Default Simple Excel macro

as far as I know you cannot copy multiple cells to the clipboard. A
better solution would be to copy the cells you choose to a new column.


Sub Copy()
Dim x As Single, y As Single

x = 1
y = 1

Do While Range("G" & x).Value < ""
If Range("G" & x).Value = "1" Then
Range("C" & x).Select
Range("C" & x).Copy
Range("H" & y).PasteSpecial
y = y + 1
End If
x = x + 1
Loop
End Sub

You can replace the Range("H") for wherever you would like the data to
be sent to...I dont know if this helps but it does work!

-Justin