Is it possible to change a value with letters and numbers?

Phunshelly

New Member
Joined
Nov 15, 2011
Messages
2
I need to change a cell format from U1-1-1 into U001-0001-0001 but every row has a differant number.For example:
U2-2-2
U2-3-2

Any help would be greatly appreciated.
Thank you
:eek:
 

Some videos you may like

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).

Dannyh1

Well-known Member
Joined
Nov 18, 2009
Messages
1,144
Hi,

Are the number of digits always they same?

Could try:

=LEFT(A1,1)&"00"&MID(A1,FIND("-",A1)-1,1)&"-000"&MID(A1,FIND("-",A1)+1,1)&"-000"&RIGHT(A1,1)
 

Phunshelly

New Member
Joined
Nov 15, 2011
Messages
2
Unfortunately no. there are 3 formats:
P8-1-101

P4-C3-3-24

P1A-1-1
Is there a find and replace I could use? find a specific pattern and add the 0's to make each set of numbers between the dashes 4 digits?

Thank you for your time.
 

Watch MrExcel Video

Forum statistics

Threads
1,122,552
Messages
5,596,801
Members
414,103
Latest member
imamalidadashzada

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