-
Solved: Copy found cell, not column
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.
[vba]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[/vba]
-
[VBA] 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")
[/VBA]
MVP (Excel 2008-2010)
Post a workbook with sample data and layout if you want a quicker solution.
To help indent your macros try Smart Indent
Please remember to mark threads 'Solved'
-
mdmackillop
Many thanks for your answer. Now tried and tested
Gil
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules