I am working on a dataset with about 5000 rows. How can i copy those rows that contain a particular string in any of its cells. and paste them on new workbook.
I am working on a dataset with about 5000 rows. How can i copy those rows that contain a particular string in any of its cells. and paste them on new workbook.
This is simple.
You should have provided more information, such as the number of columns to select.
But I will create something to get you started.
This file looks for "Select" in the whole workbook
Then selects the entire row and copies it
It then opens a new workbook and pastes the copied rows.
Please Login or Register to view this content.
Last edited by mehmetcik; 08-11-2014 at 02:50 PM.
Hi,
I am novice in excel. Can you please tell me how to use that code. And there are 8 columns (A-H). and the string doesn't have to be an exact match it is okay if its a subset. Thanks you.
Last edited by avinkris; 08-11-2014 at 03:25 PM.
Ok
I have created a workbook for you.
Open it, click on developer, then Macros and then run Select_Special.
The macro works as described above.
You can edit it by clicking on developer, then Macros and then selecting Select_Special and clicking on edit.
The macro is quite simple to modify.
The only variables that you need to consider are:
Please Login or Register to view this content.
Thank you very much. That was very helpful.
but what if there is extra text in the cell along with SELECT. For example i want to copy the row even if SELECT is a substring like "aSELECTb" or "a SELECT B" "aSELECT" etc.
replace this line
withPlease Login or Register to view this content.
Please Login or Register to view this content.
excellent thankyou.
hi, the program is stopping at Selection.Copy. when I try to do it manually at this point it says "cannot copy multiple selections."
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks