Formula to Replace a Partial String Within a Cell

pschroeder

New Member
Joined
Mar 6, 2012
Messages
10
Office Version
  1. 365
Platform
  1. Windows
I'm attempting to automate a workbook (without macros) using formulae to tidy/enhance data.

I've made a few unsuccessful attempts at using the SUBSTITUTE command to replace a specific string within a cell.

Is there a combination of commands that can be adopted to achieve this. For example:-

InstructionExisting Cell ContentRequired Cell Content
Replace "Rd" with "Road"69-75 Sandgate Rd69-75 Sandgate Road
Replace "Rd" with "Road"260 Earnshaw Rd260 Earnshaw Road
Replace "Rd" with "Road"338 Guardhouse Rd338 Guardhouse Road
Replace "St" with "Street"18 Tennant St18 Tennant Street
Replace "St" with "Street"14 Daniel St14 Daniel Street
Replace "St" with "Street"Unit 3, 97 Banksia StUnit 3, 97 Banksia Street

Thanks
 

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying
Could you use something like this?

23 11 01.xlsm
BCDEF
1Existing Cell ContentRequired Cell ContentShortFull
269-75 Sandgate Rd69-75 Sandgate RoadRdRoad
3260 Earnshaw Rd260 Earnshaw RoadStStreet
4338 Guardhouse Rd338 Guardhouse RoadAveAvenue
518 Tennant St18 Tennant Street
614 Daniel St14 Daniel Street
725 Rose Ave25 Rose Avenue
818 Strand Rd18 Strand Road
915 Smith Lane15 Smith Lane
Replace
Cell Formulas
RangeFormula
C2:C9C2=BYROW(B2:B9,LAMBDA(rw,LET(end,TEXTAFTER(rw," ",-1),TEXTBEFORE(rw," ",-1)&" "&XLOOKUP(end,E$2:E$4,F$2:F$4,end))))
Dynamic array formulas.
 
Upvote 0

Forum statistics

Threads
1,223,234
Messages
6,170,891
Members
452,366
Latest member
TePunaBloke

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