I am needing help making a macro that will save me time in my job

TcHawker

New Member
Joined
Apr 5, 2022
Messages
1
Office Version
  1. 365
Platform
  1. Windows
  2. Mobile
  3. Web
I am looking to make a Macro in VBA that when run:
  1. creates a new sheet called "results" after the first sheet (to the right)
  2. on the original sheet search Colum B for if any of an array of words is present in a cell
  3. if it is to select the row and move it to the sheet called results
  4. delete the empty space from the moved row
an example would be if I wanted to search the column for any cell that had "casual" and one cell had "Casual Worker" I would want the macro to select that row and cut and paste it to the results sheet, then go back and delete the empty cell.
I think an array for the words would work best as The list of words might change
the sheet always has the info in the same column so its always column b that has the words in
I am able to code the macro if Colum b only contained the word. but 99% of the time it's only part of the string of text
if anyone could help that would be amazing

I am not very savvy with VBA,
I found pieces that allowed me to create a new sheet after the original and then name it something, then I found out how to select words from B and make it select the row and move it to the other sheet.
its mainly setting up the array and then having it search out specific words in a line of text in each cell
 

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes

Forum statistics

Threads
1,223,162
Messages
6,170,432
Members
452,326
Latest member
johnshaji

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