Search and replace Macro help needed

R

richiwatts

I have about 10 words that I need to search and replace. I need to make
sure that it only searches and changes whole words. I would also need
to change the colour to green.

Does anyone have a Macro that will do this? I need it to search and
replace all 60 sheets in the file.

e.g

Search for all instances of "shop"

I want to go to the *shop*

Replace with "pub"

I want to go to the *pub*



I also need to make sure it is case sensitive and only finds full words
or sentences.

Shop = won't be changed
shopping = won't be changed

-------------

I have Excel 2000

Many thanks
Richi
 
R

Ron de Bruin

Hi
and add a line to replace : rng.value = "what you want"
This is not working in this example.
Use it only for making the color

See the VBA help for the Replace Function



--
Regards Ron de Bruin
http://www.rondebruin.nl


Ron de Bruin said:
Here are some basic examples
Try it on a test workbook

See the last example on this page(all sheets)
http://www.rondebruin.nl/find.htm

Change Matchcase to True
and add a line to replace : rng.value = "what you want"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top