find a keyword then copy the whole cell and paste to another workbook

ryanhou

New Member
Joined
Feb 17, 2016
Messages
2
Hi, I am a new macro user
I have a folder, which consists of lots of excels. Now I need to create a new excel with a macro that can,
(After running the macro)
1. have a text box to ask me to type in what keyword I want to search for.
2. search through all the Sheet1 in all my excels in that folder for that certain keyword.
3. copy the whole cell sentences if found the keyword and paste to my current worksheet in my newly created workbook rows by rows.
4. even if some cells are exactly same, copy all the repeated cells.
(so it will look like in my new worksheet, sentences with the keyword listed from A1 onwards)

5. next, i want columns B1 onwards in my worksheet, to list dates of each sentences created.
(For example, I have 5 excels in my folder, each with a cell containing a same keyword, each excel was created on certain different dates. I want copied sentence from first excel has the first excel's created date, etc)
6. so it will look like in my new worksheet in my newly created workbook, keyword related sentences are listed from A1 onwards, and each respective excel created date is listed correspondingly from B1 onwards.

7. after completed, there is a message box showing "completed". If the keyword can't be found in all my excels, there will be a message box showing "information could not be found"

Thanks for anyone's help!!!!
 

Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.

Forum statistics

Threads
1,223,214
Messages
6,170,771
Members
452,353
Latest member
strainu

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top