0

I have the following numbers in Column A and I need to standardize them to a fixed 8 alphanumeric string as in Column B:

    Column A     Column B
1   147731M      0147731M
2   0026146A     0026146A
3   418207L      0418207L
4   0169869M     0160869M
5   2435G        0002435G

I have tried the formula =TEXT(A2,"000000") but it works only when the letters are removed.

BigBen
  • 46,229
  • 7
  • 24
  • 40

1 Answers1

0

You can use this:

=REPT("0", number_of_zeros-LEN(A1)) & A1
 ^--- repeat "0" number_of_zeros you want - length A1 and then concatenate A1
Alberto Sinigaglia
  • 12,097
  • 2
  • 20
  • 48