Excel VBA that searches for a keyword in a list of keywords and pastes the entire row the keyword appears in into a new worksheet.

norideen

New Member
Joined
Mar 7, 2021
Messages
1
Office Version
  1. 365
Platform
  1. Windows
Hi,
So I'm working with a huge set of pdfs that I'll be importing into excel using power query. That part is very straightforward but the second part is what I've been having trouble with.

I basically need to:
1. Search for 1 keyword in a LIST of keywords (in any column from a single worksheet)
2. When that keyword is found, note every column it appears in (column f, column g...)
3. Apply a filter for one column (F) using that keyword
4. Copy the entire row that they keyword appears in
5. Then paste it into a new worksheet

I imagine this would use a lot of loops!
Step 4 and 5 need to repeat for every column that is found in step 3.
After (step 5) all the columns are searched in, It should go back to the LIST in step 1 and repeat the whole process for the 2nd keyword. And repeat until the entire process is repeated for every keyword.
 

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.

Forum statistics

Threads
1,216,155
Messages
6,129,185
Members
449,492
Latest member
steveg127

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