concantinating two columns and adding a hyphen

G

GARY NEUBAUER

I have 2 cells with 3 digits in each cell. I need to bring the tw
cells together into a six digit cell, with the first three digit
separated by a hypen. For example, 123 in cell one, and 456 in cel
two. In a separate cell I need them displayed as 123-456.

Thank
 
P

Peo Sjoblom

=A1&"-"&B1

--

Regards,

Peo Sjoblom

(No private emails please, for everyone's
benefit keep the discussion in the newsgroup/forum)
 
R

Ron Rosenfeld

I have 2 cells with 3 digits in each cell. I need to bring the two
cells together into a six digit cell, with the first three digits
separated by a hypen. For example, 123 in cell one, and 456 in cell
two. In a separate cell I need them displayed as 123-456.

Thanks

Several methods depending on exactly what you want.

Your numbers are in A1 & B1

=A1 & "-" & B1

=TEXT(A1,"000-") & TEXT(B1,"000")

=A1*1000 + B1

and custom format the cell (Format/Cell/Number/Custom Type: 000-000

=TEXT(A1*1000+B1,"000-000")

Choice 3 will be a number; the others will be TEXT



--ron
 
G

Gord Dibben

Gary

A1 has 123
B1 has 456

C1 has =A1 & "-" & B1

Note: these will no longer be "numbers", but text.

Gord Dibben Excel MVP
 

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