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:
 

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.
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)
 
Upvote 0
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.
 
Upvote 0

Forum statistics

Threads
1,214,585
Messages
6,120,397
Members
448,957
Latest member
Hat4Life

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