PDA

View Full Version : Solved: Copy found cell, not column



Gil
11-17-2011, 12:18 AM
Hello
I have recorded this macro but am having difficulty copying the found cell to then paste elsewhere. My efforts only copy the whole column which is not what I need. The range H19 is always going to vary. Any help is always gratefully received.

Sub Macro3()
'
Range("H1:H1000").Select
Selection.Find(What:="1/", After:=ActiveCell, LookIn:=xlFormulas, LookAt _
:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:= _
False, SearchFormat:=False).Activate
Range("H19").Select
Selection.Copy
Range("E3").Select
ActiveSheet.Paste
End Sub

mdmackillop
11-17-2011, 05:08 AM
Dim c As Range

Set c = Range("H1:H1000").Find(What:="1/", LookIn:=xlFormulas, LookAt _
:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:= _
False, SearchFormat:=False)

c.Copy Range("E3")

Gil
11-17-2011, 06:59 AM
mdmackillop
Many thanks for your answer. Now tried and tested

Gil