Extract and replace particular character in a cell

DQ2013

New Member
Joined
Nov 7, 2013
Messages
31
HI
Please help me with the following.
I have the following data as "SKU" I require a formula to look for "ORG" and replace as "ORA" . I cannot use the find and replace as the data is live dump hence require a formula.

SKUrequire the following
1570T1-ORG-R0871570T1-ORA-R087
1570T1-ORG-R0921570T1-ORA-R092
1570T1-ORG-R0971570T1-ORA-R097
1570T1-ORG-R1021570T1-ORA-R102
1570T1-ORA-R0871570T1-ORA-R087
1570T1-ORA-R0921570T1-ORA-R092
1570T1-ORA-R0971570T1-ORA-R097
1570T1-ORA-R1021570T1-ORA-R102
1500T1-ORG-DM1500T1-ORA-DM
1500T1-ORG-EL1500T1-ORA-EL
1500T1-ORG-FXL1500T1-ORA-FXL
1500T1-ORG-G2XL1500T1-ORA-G2XL
1500T1-ORG-G3XL1500T1-ORA-G3XL
1500T1-ORG-G4XL1500T1-ORA-G4XL
1500T1-ORG-G5XL1500T1-ORA-G5XL
1500T1-ORA-CS1500T1-ORA-CS
1500T1-ORA-DM1500T1-ORA-DM
1500T1-ORA-EL1500T1-ORA-EL
1500T1-ORA-FXL1500T1-ORA-FXL
1500T1-ORA-G2XL1500T1-ORA-G2XL
1500T1-ORA-G3XL1500T1-ORA-G3XL
1500T1-ORA-G4XL1500T1-ORA-G4XL
1500T1-ORA-G5XL1500T1-ORA-G5XL

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

Thanks and regards,
 

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce
with PowerQuery

Code:
[SIZE=1]let
    Source = Excel.CurrentWorkbook(){[Name="Table8"]}[Content],
    #"Replaced Value" = Table.ReplaceValue(Source,"ORG","ORA",Replacer.ReplaceText,{"SKU"})
in
    #"Replaced Value"[/SIZE]

SKUSKU
1570T1-ORG-R0871570T1-ORA-R087
1570T1-ORG-R0921570T1-ORA-R092
1570T1-ORG-R0971570T1-ORA-R097
1570T1-ORG-R1021570T1-ORA-R102
1570T1-ORA-R0871570T1-ORA-R087
1570T1-ORA-R0921570T1-ORA-R092
1570T1-ORA-R0971570T1-ORA-R097
1570T1-ORA-R1021570T1-ORA-R102
1500T1-ORG-DM1500T1-ORA-DM
1500T1-ORG-EL1500T1-ORA-EL
1500T1-ORG-FXL1500T1-ORA-FXL
1500T1-ORG-G2XL1500T1-ORA-G2XL
1500T1-ORG-G3XL1500T1-ORA-G3XL
1500T1-ORG-G4XL1500T1-ORA-G4XL
1500T1-ORG-G5XL1500T1-ORA-G5XL
1500T1-ORA-CS1500T1-ORA-CS
1500T1-ORA-DM1500T1-ORA-DM
1500T1-ORA-EL1500T1-ORA-EL
1500T1-ORA-FXL1500T1-ORA-FXL
1500T1-ORA-G2XL1500T1-ORA-G2XL
1500T1-ORA-G3XL1500T1-ORA-G3XL
1500T1-ORA-G4XL1500T1-ORA-G4XL
1500T1-ORA-G5XL1500T1-ORA-G5XL
after any changes:Ctrl+Alt+F5
 
Upvote 0
HI Sandy,

Thanks for your help, understand this is macro , is there a way to have formula instead of macro.

Thanks and regards,
Drren
 
Upvote 0
Hi,

Formula copied down:


Book1
AB
1SKU
21570T1-ORG-R0871570T1-ORA-R087
31570T1-ORG-R0921570T1-ORA-R092
41570T1-ORG-R0971570T1-ORA-R097
51570T1-ORG-R1021570T1-ORA-R102
61570T1-ORA-R0871570T1-ORA-R087
71570T1-ORA-R0921570T1-ORA-R092
81570T1-ORA-R0971570T1-ORA-R097
91570T1-ORA-R1021570T1-ORA-R102
101500T1-ORG-DM1500T1-ORA-DM
111500T1-ORG-EL1500T1-ORA-EL
121500T1-ORG-FXL1500T1-ORA-FXL
131500T1-ORG-G2XL1500T1-ORA-G2XL
141500T1-ORG-G3XL1500T1-ORA-G3XL
151500T1-ORG-G4XL1500T1-ORA-G4XL
161500T1-ORG-G5XL1500T1-ORA-G5XL
171500T1-ORA-CS1500T1-ORA-CS
181500T1-ORA-DM1500T1-ORA-DM
191500T1-ORA-EL1500T1-ORA-EL
201500T1-ORA-FXL1500T1-ORA-FXL
211500T1-ORA-G2XL1500T1-ORA-G2XL
221500T1-ORA-G3XL1500T1-ORA-G3XL
231500T1-ORA-G4XL1500T1-ORA-G4XL
241500T1-ORA-G5XL1500T1-ORA-G5XL
Sheet307
Cell Formulas
RangeFormula
B2=SUBSTITUTE(A2,"ORG","ORA")
 
Upvote 0

Forum statistics

Threads
1,215,095
Messages
6,123,073
Members
449,093
Latest member
ripvw

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