Insert numberrs in from of speciified Text

howard

Well-known Member
Joined
Jun 26, 2006
Messages
6,561
Office Version
  1. 2021
Platform
  1. Windows
I have the following text the appears in Col A

1) Where East appeas in Col A and EA01 does not appear at the beginning on the text , I need EA01- to appear in front on the text

2) Where BR1 appears in Col A and EA02 does not appear at the beginning on the text , I need EA02- to appear in front on the text

Your assistance in this regard is most appreciated
 

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce
Thanks for the reply. It is part of the text in col A
 
Upvote 0
See Sample Data below to give you an idea of hat the data in Col A looks like


Excel 2012
A
1PO 1258 BR1 05 - ORDER 2893
2PO 1272 EAST 04 - DOC 364
Sheet1



This is what data must look like after running Macro


Excel 2012
A
1EA01-PO 1258 BR1 05 - ORDER 2893
2EA02-PO 1272 EAST 04 - DOC 364
Sheet1


Your assistance in this regard is most appreciated
 
Last edited:
Upvote 0
You can do it without a macro- insert a column and use functions to generate what you need -
Look up and play around with the "search" function or the "find" function, and the "if" function. You probably also need to understand the "and" function and the concatenation operator, &.

Try to learn how to to use these things for yourself... don't rely on others to always give you the final code or formula you need.
 
Upvote 0

Forum statistics

Threads
1,214,832
Messages
6,121,845
Members
449,051
Latest member
excelquestion515

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