Translate sequence of numbers to another sequence of numbers

rbylin

New Member
Joined
Jun 27, 2018
Messages
4
Hi

I need to translate a seuqence of numbers 01000988 to another sequence format, 0010-01-0988 were the part 0010 is matched to the first four symbols of 01000988 the 01 is just Always 01 and 0988 should match the last 4 of 01000988

this is what I want the results to be

01000988 = 0010-01-0988
01000989 = 0010-01-0989

03400789 = 0034-01-0789
03401200 = 0034-01-1200

05000365 = 0050-01-0365
 

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney
Welcome to the board.

Your example suggests first 4 parts of the sequence are 0 & first left 3 chars of the original string
01000988 = 0010-01-0988
01000989 = 0010-01-0989

03400789 = 0034-01-0789
03401200 = 0034-01-1200

05000365 = 0050-01-0365

vs
were the part 0010 is matched to the first four symbols of 01000988
Which doesn't match your provided example.

This works for the examples provided
Code:
="0"&LEFT(A1,3) & "-01-"&RIGHT(A1,4)
 
Last edited:
Upvote 0
Perhaps : =TEXT(LEFT(A1,LEN(A1)-5),"0000") & "-01-" & RIGHT(A1,4)
 
Upvote 0
Welcome to the board.

Your example suggests first 4 parts of the sequence are 0 & first left 3 chars of the original string

vs
Which doesn't match your provided example.

This works for the examples provided
Code:
="0"&LEFT(A1,3) & "-01-"&RIGHT(A1,4)



Thank you :D late answer but still! just had to translate the functions to swedish to get it to work :P

Looks like this, ="0"&VÄNSTER(A1;3) & "-01-"&HÖGER(A1;4)
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

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