function result losing leading zeros

C

cat

I am merging two custom values "0000" together with a dash, and the result
loses the leading zeros. Ex. 0001 and 0101 end up as 1-101 and I want it to
be 0001-0101. Note*The number of leading zeros changes since I have a huge
list of values, so I can't just add the 3 and 1 zero(s) needed in this
example.

using formula =(F7&"-"&G7) AND Custom Format 0000 in the two previous
columns to the function column.
 
P

Peo Sjoblom

TEXT function not convert to text, if you have for instance F7 formatted as
0000 then when you concatenate it with another cell you need to use the same
format


=TEXT(F7,"0000")&" - "&TEXT(G7,"0000")

--


Regards,


Peo Sjoblom
 

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