concatenating cells

R

Rosson Cain

Hello, I need to concatenate two cells together. The
problem is that the first cell always needs to be 6 digits
long (e.g. if the entry is 23456 it need to be
concatenated as 023456) and the second 4 digits long.
(e.g. if the entry is 1 then it should be 0001, with a
resulting concatenation of 0234560001) I have each
independent field formatted to "000000" and "0000" but
Excel doesn't honor this when combining the two cells. I
was thinkning an if statement might be appropiate but I
couldn't seem to get anything to work. Any help would be
appreciated.
 
R

Rafael Ortiz

Try this:

=TEXT(B2,"000000")&TEXT(C2,"0000")

Change cell references as needed...

MRO
 
C

Cecilkumara Fernando

Rosson,
try
=TEXT(A2,"000000")&TEXT(B2,"0000")
where A2 is 23456 and B2 is 1
HTH
Cecil
 

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