Insert a hyphen in a string
Solved
binou
-
Hugues -
Hugues -
Hello,
I have a table with a list of license plates (the new ones)
I would like to insert a dash between the letters and the numbers:
to have AA-978-BZ instead of AA978BZ
Thank you for your help
I have a table with a list of license plates (the new ones)
I would like to insert a dash between the letters and the numbers:
to have AA-978-BZ instead of AA978BZ
Thank you for your help
1 réponse
Hello
if code in A1:
in B1:
=LEFT(A1,2)"-"&LEFT(RIGHT(A1,LEN(A1)-2),LEN(A1)-4)"-"&RIGHT(A1,2)
for a possible variant of 3 to 4 digits in the numeric zone
simpler if we assume that the numeric part remains three:
=LEFT(A1,2)"-"&LEFT(RIGHT(A1,LEN(A1)-2),3)"-"&RIGHT(A1,2)
best regards
--
Let’s ask ourselves if we are not alone in understanding what is being explained?
if code in A1:
in B1:
=LEFT(A1,2)"-"&LEFT(RIGHT(A1,LEN(A1)-2),LEN(A1)-4)"-"&RIGHT(A1,2)
for a possible variant of 3 to 4 digits in the numeric zone
simpler if we assume that the numeric part remains three:
=LEFT(A1,2)"-"&LEFT(RIGHT(A1,LEN(A1)-2),3)"-"&RIGHT(A1,2)
best regards
--
Let’s ask ourselves if we are not alone in understanding what is being explained?
Have a nice day.
Hugues