concatenating cells

  • Thread starter Thread starter Rosson Cain
  • Start date Start date
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.
 
Try this:

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

Change cell references as needed...

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