Have Text In Column A, Need Vba Code To Find Cell With Matching Text In Another Workbook. Can Anyone Help Please.
Have Text In Column A, Need Vba Code To Find Cell With Matching Text In Another Workbook. Can Anyone Help Please.
here is a start - this was written to go down a column (the colkm) of text row by row (the j) and find the text in that cell in a range on a different sheet. You would need to switch back and forth between workbooks as well as sheets.
without knowing more of what your are dealing with it is difficult to help more.
![]()
Please Login or Register to view this content.
not a professional, just trying to assist.....
Thanks Duane, have run out of time today. I will give it a try later & let you know how it went.
Duane, maybe if I explain fully what I am trying to achieve you could help me.
In workbook "REGO" I have registration numbers in cells A5111 to A5250.
These registration numbers also reside in another workbook "DETAIL" somewhere in the range A2 to A8250.
I am struggling trying to write a macro that that will find the text in "REGO" A5111 in the "DETAIL" workbook, copy all the cells to the right (B?? to AE??) and paste them into "REGO" at B5111. Looping through to "REGO" A5250.
try this - I have not testted or debugged though
![]()
Please Login or Register to view this content.
Duane, the macro falls over at, "mytext = Sheets("sheet1").Cells(j, 1).Text" with run-time error 1004 - application-defined or object-defined error.
Also question: The "DETAIL" workbook is actually .csv file ie. doesn't have sheets, what code to set the range in this file.
Sorry to bug you again, but as you've no doubt gathered I'm new at this.
Thanks....Peter
is the worksheet in the rego file actually named shet1? If not, replace sheet1 withthe correct sheet name. Same goes for my sheet2 references.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks