A Microsoft Office (Excel, Word) forum. OfficeFrustration

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.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » Worksheet Functions
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

concatenating cells



 
 
Thread Tools Display Modes
  #1  
Old September 15th, 2003, 06:30 PM
Rosson Cain
external usenet poster
 
Posts: n/a
Default 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  
Old September 15th, 2003, 06:46 PM
Rafael Ortiz
external usenet poster
 
Posts: n/a
Default 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  
Old September 15th, 2003, 06:50 PM
Cecilkumara Fernando
external usenet poster
 
Posts: n/a
Default 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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 10:14 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.