Search and Copy from one tab to a second tab in the same workbook

  • Thread starter Thread starter markcope91
  • Start date Start date
M

markcope91

I'm having difficult writing the macro to do a search on a certain field on
one workbook and copy the entire row of data onto a second tab any ideas?
 
set sht1 = sheets("Sheet1")
set sht2 = sheets("Sheet2")


set c = sht1.columns("A").find(what:="abc", _
lookin:=xlvalues,lookat:=xlwhole)
if not c is nothing then
sht1.rows(c.row).copy _
destination:=sht2.rows(5)
end if
 
Back
Top