Concatenate 2 different number formats

A

Art

I am trying to create a string of numbers from 2 different number formats.
The formula I am trying is on test tab 3 =concatenate("T",Test1!A1,Test1!A2).
I have created custom format 00000000 for A1 and custom format 000000000000
for A2.
A1 has 000000006
A2 has 000001212422

I would like it to return T000000006000001212422 but it returns T61212422.
Any ideas on how to make it work?

Thanks
 
D

Dennis

Do A1 and A2 need to be numbers ?
If you enter them with an apostrophe to signify text, it works OK
'000000006
'000001212422
If you need them as numbers you can use the =VALUE(A1) to get the number
 
M

Marcelo

="T"&rept("0",8-len(a1))&a1&rept("0",12-len(a2))&a2


hth
--
regards from Brazil
Thanks in advance for your feedback.
Marcelo



"Art" escreveu:
 
G

Gary''s Student

Make sure that when you paste the formula in, no extra spaces are included in
the paste.

Better to copy from the post and paste directly in the formula bar instead
of the cell.
 
A

Art

This also returns the formula and not data. A1 and A2 are forumulas. They sum
different things if that matters?
 
W

ward376

Make sure that the cell isn't formatted as text - prior to entering
the formula.

Cliff Edwards
 
A

Art

It return a formula error on the first "0"

Marcelo said:
="T"&rept("0",8-len(a1))&a1&rept("0",12-len(a2))&a2


hth
--
regards from Brazil
Thanks in advance for your feedback.
Marcelo



"Art" escreveu:
 
D

David Biddulph

You've probably got the cell formatted as text. Reformat it as General, and
re-enter the formula.
 
A

Art

Thank you all for the rapid responses. This is the formula that I was able to
get to work. =concatenate("T",TEXT(A1,"000000000"))&TEXT(A2,"000000000000")

This is probably what you were trying to tell me.

Thanks Again
 

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