Concatenate with leading zeros

  • Thread starter Thread starter Nikki
  • Start date Start date
N

Nikki

I need to input a formulat to concatenate three cells together. The first
cell is a nine digit number ex. 001234567 the second cell is a one digit
number ex. 8 and the third cell is a five digit number ex. 00123. I how do I
concatenate these together?
 
Use the & operator, eg =A1&A2&A3
If you've formatted the cells as text, or used ' when typing the
values it will display the leading zeros as entered.
 
001234567 is not a number unless it is a formatted number.

Excel would drop the leading zeros if a real number.

Assume 1234567 in A1, 8 in A2, 123 in A3

=TEXT(A1,"000000000")&A2&TEXT(A3,"00000")


Gord Dibben MS Excel MVP
 
Back
Top