Search string and copy row to another sheet

[Closed]
Report
-
Posts
2818
Registration date
Sunday September 12, 2010
Status
Moderator
Last seen
October 18, 2021
-
Hello,

I am trying to use a macro which will look for a value in workbook1's column A and on finding that value, it will copy that whole row onto another workbook. Overall I have progress but the macro is repeatedly showing me an error on the below line -


Rows(CStr(LSearchRow) & ":" & CStr(LSearchRow)).Select


Is it something with the fact that I am using Excel 2010? I am not a programming expert, I recorded the macro and played around the coding to meet my requirements. Please help.

1 reply

Posts
2818
Registration date
Sunday September 12, 2010
Status
Moderator
Last seen
October 18, 2021
486
Hi Shabu,

If LsearchRow is a number then the following will work:
Rows(LSearchRow).Select

Best regards,
Trowa