Concatenate with leading zeros

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?
 
R

Reitanos

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.
 
G

Gord Dibben

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top