Need a macro to search for a specific list of words and run an other macro if found

kmc1234

New Member
Joined
Sep 3, 2012
Messages
1
I have been very puzzled with this one.

I am looking to create a macro that will search my spreadsheet for specific list of words. If any of these words exist I would like to excecute a second (wordart) macro.

I would like the macro to execute each time the file is closed, so that if the found words are removed then the wordart is also removed.

Does anyone have any ideas on the best way to do this?

Many thanks..
 

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).
You can perhaps try this.
Sub replace()


Sheets("xyz").Select
For Each c In Range("A1:J650")
If c.Text = "your search string " Then
Your function
Next c
End Sub

and for the second function you asked, you can begin your coding with
Sub Workbook_BeforeClose(cancel As Boolean)
 
Upvote 0

Forum statistics

Threads
1,216,496
Messages
6,130,982
Members
449,611
Latest member
Bushra

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