View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Find and copy in macro

Dim sStr as String
Dim oFind as Range
sStr = "recived"
Columns(1).Find("Report Total")
If Not oFind Is Nothing Then
oFind.Offset(0,1).Copy _
Destination:=Worksheets(sStr).Range("C10080")
End If

if the worksheet is named received, wth the normal spelling, or with the
other alternate spelling you used, "'recieved" then adjust the assignment of
sStr to reflect the actual name of the worksheet.

--
Regards,
Tom Ogilvy




"Duncan J" wrote in message
...
Hi,
I have two spread sheets. One called DHL and the other recived. I want to

find the word report total in DHL and copy the cell to the right of that and
paste it to the recieved worksheet C10080. I've been trying the
Set oFind = Range("A:").Find("Report Total")
If Not oFind Is Nothing Then
oFind.Resize(1, 3).Copy _
Destination:=recived ("recived").Range("C10080")
End If

Thanks,DJ