I have 6 fields in a row in open office, the 1st is a word, the 2nd, 3rd, and 4th are a number with a leading zero, the 5th and 6th are regular numbers. How do I join them all together with a comma between them so that the leading zero stays?
Asked
Active
Viewed 1.1k times
2 Answers
10
Based on your comment about your numbers having a leading 0 in virtue of a custom number format, you need to incorporate TEXT()
functions into your formula to retain (i.e., add) your leading 0s.
=CONCATENATE(A1,",",TEXT(B1,"0#####"),",",TEXT(C1,"0#####"),",",TEXT(D1,"0#####"),",",E1,",",F1)
Just be sure to include as many #'s as the max length of a number in that field.

Excellll
- 5,609
- 4
- 38
- 55
-
1you can use whatever custom format from the number format formular, i prefer "000000"... – Aprillion May 31 '12 at 19:09
-
1I just tried this, and it looks like you need to use a semi-colon in the `TEXT()` calculation - i.e. `TEXT(B1; "0####")` – AnuragBabaresco Jan 06 '15 at 18:33