Is it possible to cycle through column E on a workbook, and search for a String (an auto part name) and each time the autopart is found copy the entire row to a new worksheet?
Is it possible to cycle through column E on a workbook, and search for a String (an auto part name) and each time the autopart is found copy the entire row to a new worksheet?
Hi, jo15765,
the answer to your question is: yes, use Find and FindNext.
Ciao,Please Login or Register to view this content.
Holger
Use Code-Tags for showing your code: [code] Your Code here [/code]
Please mark your question Solved if there has been offered a solution that works fine for you
Beautiful! Would I be able to search a 2nd workbook also? So 1st search PartsInStock.xls then search PartsToBeOrdered.xls
Yes, this is only searching in Column "E". You can change this bit in to multi range and multi work sheets.
Hi, jo15765,
why didnīt you put that in the opening post as well?
You can either hardocde this (so have a copy of the search right under the original one). Only thing to mind is that the Exit Sub in the first loop should be altered to be a jump mark for the entering of the second loop. Iīd preferred to have the code inside the workbook where the rows are to be copied (you didnīt mention that in your post up till now).
I assumed there is one workbook to collect data on the active sheet. Both other workbook are to be found in the same folder as the workbook with code, if not please amend Drive and Folder to the workbook name.
This code will call the procedure:
And this is what is called from above:Please Login or Register to view this content.
Ciao,Please Login or Register to view this content.
Holger
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks