Inserting text into another text string

sweetmetrics

New Member
Joined
Apr 29, 2011
Messages
22
Ok, so I am very close to this and probably just need a pointer or two...

What I am using:
Excel for Mac 2011

What I Have:
300 rows of html text, exported from a website, that contain product titles

What I am trying to do:
Insert the word "Lenses" before the word "for" for each row. For example, the following is the beginning of text string(omitting the leading < to avoid editing the html of this actual post), the bold word is what I need inserted, "span style="font-size: 13pt; font-weight: bold; font-family: Verdana; color: rgb(0, 0, 0);">Ice Blue Lenses for Oakley Dispatch 1..."

What I've tried
=FIND("for",D2,1) to find the character number of "for" then I am stuck on which concatenating formula to use from here or if there is a better a way to insert the text?

Thank you in advance for your help! :)
 

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.
An easy way might be to just do a find/replace (CTRL+H) and change "for" to "Lenses for" (without the quotes)
 
Upvote 0
Or if you prefer a formula option, try =SUBSTITUTE(A1,"for","Lenses for")

Maybe even change it to =SUBSTITUTE(A1,"for","Lenses for",1) to control which instance you would like to change.
 
Upvote 0

Forum statistics

Threads
1,214,851
Messages
6,121,931
Members
449,056
Latest member
denissimo

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