Creating a code from combining numbers from several cells

jptravis

New member
Joined
Jan 7, 2015
Messages
3
Reaction score
0
Points
0
I have a spreadsheet that contains, in part, 5 columns of numbers that I want to combine to create one overall field that can be used as a key field. The number of digits in each column is different but I want a fixed-length digit as the output. There are leading zeros (for example "001) in some fields and others contain all zeros ("00000") but every digit is important as part of the code. How can I combine these fields? I am obviously not an experienced programmer. I have tried the concatenate formula but I lose the placeholder zeros. Thanks for any help you can offer.
 
Last edited by a moderator:
Can you give some examples of how the sheet looks, and the outcome you desire?
 
Can you give some examples of how the sheet looks, and the outcome you desire?

I have columns that contain a street code, address code, distance, corner street code and maintenance district. One line has the numbers:

100 00000 0015 053 3

I want to get all of these codes into one cell that would have the result of: 100000000150533

What I need to do is combine the cells but keep the number of digits in each cell, for instance not have the "00000" value treated as "0".
 
I assume then the originals are just formatted to appear as 3, 4 or 5 digits numbers?

Then you will need the TEXT function...

e.g.

=TEXT(A1,"000")&TEXT(B1,"00000")&TEXT(C1,"000")&TEXT(D1,"000")&E1

The number of 0's represents the number of digits for each cell....
 
Back
Top