If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
concatenating cells
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. |
#2
|
|||
|
|||
concatenating cells
Try this:
=TEXT(B2,"000000")&TEXT(C2,"0000") Change cell references as needed... MRO "Rosson Cain" wrote in message ... 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. |
#3
|
|||
|
|||
concatenating cells
Rosson,
try =TEXT(A2,"000000")&TEXT(B2,"0000") where A2 is 23456 and B2 is 1 HTH Cecil "Rosson Cain" wrote in message ... 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. |
Thread Tools | |
Display Modes | |
|
|