Merging info from 5 cells to 1

G

Guest

I have a number 21-/A/-525-/E/-0001 the / represent the cells, I want it in
one cell to look like 21-A-525-E-0001. We I concatenate or use & it removes
the dashes and turns 0001 into 1. Does anyone have any suggestions?
 
Y

y_not

Stupid suggestion but have you tried formatting the cell as "Text"?
don't know if this will work - just a thought

Good luck

Ton
 
J

jbrackett

If the last set is always 4 chars:

=A1&"-"&B1&"-"&C1&"-"&D1&"-"&(REPT(0,4-LEN(E1))&E1)

A B C D E FORMULA (RESULT)

1 21 A 525 E 1 21-A-525-E-0001

2 68 B 525 E 21 68-B-525-E-002
 
G

Guest

I think your problem is the cells with numbers have some wierd custom
formats. If this is the case you can use a formula like this

=TEXT(A1,"#-")&B1&TEXT(C1,"-#-")&D1&TEXT(E1,"-0000")
 
G

Guest

Thanks that worked perfectly

Sloth said:
I think your problem is the cells with numbers have some wierd custom
formats. If this is the case you can use a formula like this

=TEXT(A1,"#-")&B1&TEXT(C1,"-#-")&D1&TEXT(E1,"-0000")
 

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