Repalce part of text

radosvep

New Member
Joined
Sep 20, 2014
Messages
2
Hi guys,

Can anyone help me how I can change part of text in a cell, for example

A1 :configure vlan port 1/1/5/1:1:32 protocol-group pppoe

using vlookup for matching of values, columns C and D

1/1/5/1 1/1/8/1
1/1/5/11 1/1/9/3

Results:
configure vlan port 1/1/8/1:1:32 protocol-group pppoe

Thank you in advance
 

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.

djo5003

New Member
Joined
May 29, 2013
Messages
14
If the text is always constant:

=CONCATENATE("configure vlan port ",VLOOKUP(RIGHT(LEFT(A1,LEN(A1)-26),LEN(LEFT(A1,LEN(A1)-26))-20),$C$1:$D$2,2,FALSE),":1:32 protocol-group pppoe")

Or if relying on A1 for output:

=CONCATENATE(LEFT(A1,20),VLOOKUP(RIGHT(LEFT(A1,LEN(A1)-26),LEN(LEFT(A1,LEN(A1)-26))-20),$C$1:$D$2,2,FALSE),RIGHT(A1,26))
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,164,164
Messages
5,835,745
Members
430,384
Latest member
kiuwai

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
Top