Replace text in middle of string and apply for multiple entries

boldee

New Member
Joined
Jan 2, 2017
Messages
3
Hello Excel Guru's,

Here is my situation, I wouldn't say it is very complex situation, but I am new to excel functions and formulas.
I would like to replace right column entry to in between left column entry, For example: One right column first entry is " DE2K903204" should be replace in left column entry tp ADDTOBUFFER DE2K903204 SE1, similarly second entry in column B should be replaced inside column A entry.

tp ADDTOBUFFER DE2K902981 SE1 DE2K903204
tp ADDTOBUFFER DE2K902981 SE1 DE2K903031
tp ADDTOBUFFER DE2K902981 SE1 DE2K903033
tp ADDTOBUFFER DE2K902981 SE1 DE2K903098
tp ADDTOBUFFER DE2K902981 SE1DE2K903198
tp ADDTOBUFFER DE2K902981 SE1 DE2K903200

<tbody>
</tbody><colgroup><col><col></colgroup>
 

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).
I'm guessing it's way more complicated than this, but....
in cell C1

Code:
="tp ADDTOBUFFER " & B1 & " SE1"

drag down as required
 
Upvote 0
I'm guessing it's way more complicated than this, but....
in cell C1

Code:
="tp ADDTOBUFFER " & B1 & " SE1"

drag down as required

Hello Michael,

Thanks for your prompt and correct response as I was expecting and the formula works, but I would like to make some more changes.
What if I want to add some code beyond replacing with right column to left column. If I add some text after after replace formula provided does not work.

tp ADDTOBUFFER DE2K902981 SE1 pf=\\EAYSSAP300\sapmnt\trans\bin\TP_DOMAIN_SE1.PFLDE2K903031

<tbody>
</tbody><colgroup><col><col></colgroup>
 
Upvote 0
Hello Michael,

Thanks for your prompt and correct response as I was expecting and the formula works, but I would like to make some more changes.
What if I want to add some code beyond replacing with right column to left column. If I add some text after after replace formula provided does not work.

tp ADDTOBUFFER DE2K902981 SE1 pf=\\EAYSSAP300\sapmnt\trans\bin\TP_DOMAIN_SE1.PFL
DE2K903031

<tbody>
</tbody>

I was able to figure out answer for my second question, all I have to do is include the additional text right before the second parenthesis so it appears along with replacement.

Thanks for your input here and helping me figure with my requirement.

Regards
Sandeep A
 
Upvote 0

Forum statistics

Threads
1,214,918
Messages
6,122,252
Members
449,075
Latest member
staticfluids

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