Forum Discussion

Rajeev_Raghavan's avatar
Rajeev_Raghavan
Copper Contributor
Jun 03, 2020

copy and paste find all rows through vba. is it possible via macros?

Option Explicit

Sub Test()

Dim foundRng As Range


Sheets("Sheet1").Select
Set foundRng = Range("A1").CurrentRegion.Find("*Cable*", LookIn:=xlFormulas)
foundRng.Rows("1:1").EntireRow.Select
Selection.Copy
Sheets("Sheet2").Activate
Range("A" & Rows.Count).End(xlUp).Offset(1).Select
ActiveSheet.Paste

End Sub

 

No RepliesBe the first to reply

Resources