Hi all
I have a find and replace module and need some helpmodifying it.
I have a vba module that looks at one excel sheet and thenit uses that to convert text. Right now it needs to find the exact string.
Is there a way I can make it convert if it finds only oneword In the find cell?
The current code looks at the sheet and if it finds what isin column D it replaces it with what is in column E. The problem is I will not alwaysknow the city and number included in the text it is finding.. If i could makeit so if it finds the word shoprite anywhere within it will then convert itinto the text in column E
Ex
Column D Column E
-0628 Shoprite #628-Middletown Vermont Bread:ShopRite Supermarkets Inc. -0641 Shoprite #641-Bricktown Vermont Bread:ShopRite Supermarkets Inc. -0299 Shoprite #299-Neptune Vermont Bread:ShopRite Supermarkets Inc. -0112 Shoprite #112-Staten Island Vermont Bread:ShopRite Supermarkets Inc. -0497 Shoprite #497-Clinton Vermont Bread:ShopRite Supermarkets Inc.
I attached an excel sheet that shows the currentconversions. I have 8 different groups that could be changing by adding anumber or city. But it will always include the main company name “kings orshoprite or wild by nature etc”
If it finds the work “kullen” it will always convert that to “Vermont Bread:King Kullen Grocery Co. Inc”.
If it finds the work “kings” it will convert to “Vermont Bread:KingsSuper Markets” and so on.
Independent Vermont Bread:Independent Wegmans Food Markets Vermont Bread:Wegmans Food Markets ShopRite Supermarkets Inc. Vermont Bread:ShopRite Supermarkets Inc. Speziale LTD (bulk order) Vermont Bread:Speziale LTD (bulk order) King Kullen Grocery Co. Inc. Vermont Bread:King Kullen Grocery Co. Inc. Wild By Nature Market Vermont Bread:Wild By Nature Market Kings Super Markets Vermont Bread:Kings Super Markets Whole Foods Market Vermont Bread:Whole Foods Market
Now they will be adding A city and number within the find cell
-0112 Shoprite #1-Staten Island -0628 Shoprite #6-Middletown -0628 Shoprite #8-Middletown -0112 Shoprite #2-Staten Island
The code for the module I use now is in the attached wordfile.
Thank you all
I was not able to find what to modify and still have itwork. I tried but everytime I got an error