function result losing leading zeros

  • Thread starter Thread starter cat
  • Start date Start date
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.
 
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
 
Back
Top