View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
tom tom is offline
external usenet poster
 
Posts: 570
Default copy from worksheet

Works just as I had hoped!
Much appreciated Gary.

"Gary''s Student" wrote:

Sub move_it()
Dim ws As Worksheet
Set ws = Sheets(Range("A1").Value)
s = Array("B1", "Z1")
For i = LBound(s) To UBound(s)
ws.Range(s(i)).Copy Sheets("Data temp").Range(s(i))
Next
End Sub

Note that s is a string array that the contains the disjoint range to be
copied.
--
Gary''s Student - gsnu200722