Forum Discussion
jmscott89
Oct 12, 2022Copper Contributor
formatting NDC numbers
I have to format a series of numbers in a 5-4-2 sequence - example 55555-4444-22 and my excel list shows them without zeros at the front.. example 4589-378-1 vs. 04589-0378-01. How can excel help m...
- Oct 12, 2022
If you have a recent version of Microsoft 365, you can use a formula.
With the original values in A1 and down, enter the following formula inn B1, then fill down:
=TEXTJOIN("-", TRUE, TEXT(TEXTSPLIT(A1, "-"), {"00000", "0000", "00"}))
HansVogelaar
Oct 12, 2022MVP
If you have a recent version of Microsoft 365, you can use a formula.
With the original values in A1 and down, enter the following formula inn B1, then fill down:
=TEXTJOIN("-", TRUE, TEXT(TEXTSPLIT(A1, "-"), {"00000", "0000", "00"}))
jmscott89
Oct 12, 2022Copper Contributor
HansVogelaar Amazing Work!! Thanks