Search string and copy row to another sheet

Closed
Shabu - Jun 28, 2015 at 03:43 AM
TrowaD Posts 2921 Registration date Sunday September 12, 2010 Status Moderator Last seen December 27, 2022 - Jul 2, 2015 at 11:09 AM
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.

Related:

1 response

TrowaD Posts 2921 Registration date Sunday September 12, 2010 Status Moderator Last seen December 27, 2022 552
Jul 2, 2015 at 11:09 AM
Hi Shabu,

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

Best regards,
Trowa
0