separate fields to one field?


Posted by Richard on February 02, 2002 11:44 AM

If I have four boxes in one row each containing one number 1-2-3-4,. Is there a way to combine them in one box so that they read, 1234

Richard

Posted by Barrie Davidson on February 02, 2002 12:03 PM

=A1&B1&C1&D1

will do it.

BarrieBarrie Davidson

Posted by Jack in the UK on February 02, 2002 12:09 PM

Try = A1&"" &B1 &"" &C1 &"" &D1 [NT]

Posted by Barrie Davidson on February 02, 2002 12:24 PM

Jack

you don't need "" in the formula (and I'm not posting this to be a jerk. Just posting it in case you didn't know).

Sincerely,
Barrie
Barrie Davidson

Posted by Richard on February 02, 2002 12:31 PM

Well, I've got to tell ya. I sat here for the past two weeks reading the help file(don't have the book) and tried everything I could think of. Did think of that way but thought it to simple to try. Thank you!

Richard

Posted by Richard on February 02, 2002 12:34 PM

By the way, Quite a bit of egg on my face bout now.

Posted by Richard on February 02, 2002 1:08 PM

If I might ask one more question?
If I wanted to reverse the formula.
1234 to 1-2-3-4.

Posted by Barrie Davidson on February 02, 2002 1:12 PM

Assuming 1234 is in A1 and you want:
• 1 in B1, use =LEFT(A1,1)
• 2 in C1, use =MID(A1,2,1)
• 3 in D1, use =MID(A1,3,1)
• 4 in E1, use =RIGHT(A1,1)

Is my assumption correct?
BarrieBarrie Davidson

Posted by Aladin Akyurek on February 02, 2002 1:19 PM

Barrie --

In case he just wants to add hyphens in the end result:

=A1&"-"&B1&"-"&"-"&C1&"-"&D1

Aladin



Posted by Richard on February 02, 2002 1:43 PM

Looking at your responce, I would say your assumtion is correct. I have to be somewhere and can't try it now, but believe me when I say if it's right, you will be the first to know and I've found a way to finally get some help with EXCELL. You can write MS till your blue in the face and end up where you started.

Thanks, Richard