Help with excel formula
I’m having difficulty with an excel formula- I can’t figure out how to create a standard formula that will eliminate the zero’s and add numbers/ characters if they are present from the original data.
Final Format is ###-#-##-##-#######
Original Data NEED IN THIS format
0214 01 0032A 21-4-1- -32A need space between dashes if no number is present
0313 03080002 31-3-3-8-2
0401 02 B 40-1-2- -B need space between dashes if no number is present
0482 03G 0048 48-2-3-G -48 dash after the 3 and no dash after the G
1194 02200015 119-4-2-20-15
I attached a sample spreadsheet.
So far I have below but I can’t figure out how to remove some zero’s and add all the data and characters.
=LEFT(A1,3)&"-"&MID(A1,4,1)&"-"&MID(A1,6,2)&"-"&" "&"-"&RIGHT(A1,4)
Any help would be appreciated.
Many thanks
Attachment | Size |
---|---|
formula for excel .xlsx | 13.32 KB |
Recent comments
5 years 42 weeks ago
6 years 28 weeks ago
6 years 40 weeks ago
6 years 42 weeks ago
6 years 43 weeks ago
6 years 49 weeks ago
7 years 5 weeks ago
7 years 5 weeks ago
7 years 5 weeks ago
7 years 5 weeks ago