how to keep leading and trailing zeros

michaelsmith559

Well-known Member
Joined
Oct 6, 2013
Messages
881
Office Version
  1. 2013
  2. 2007
I have split a long decimal number into three columns (3 digits per column). I did a custom number format and got the numbers to keep the zeros. I further split the numbers into two cells (one column has one digit, the other column has two digits). The problem is now when I try and concatenate them using this formula:
"=concatenate(a1,".",b1)" , if there is a leading zero in the column with two digits it will not include it. So if I try this formula and the number happens to be 7 in A1, 08 in B1 and try the formula it returns 7.8 and not 7.08. How can I fix this?
 

Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.
whats your custom format? try use the custom format of just an @ symbol
 
Upvote 0
I have split a long decimal number into three columns (3 digits per column). I did a custom number format and got the numbers to keep the zeros. I further split the numbers into two cells (one column has one digit, the other column has two digits). The problem is now when I try and concatenate them using this formula:
"=concatenate(a1,".",b1)" , if there is a leading zero in the column with two digits it will not include it. So if I try this formula and the number happens to be 7 in A1, 08 in B1 and try the formula it returns 7.8 and not 7.08. How can I fix this?
Did you split the 3-digit number into 1-digit/2-digits solely for the purpose of being able to create the number with the decimal point in it? If so, you could have done that directly when you formatted the number to keep the zeroes... instead of using 000 you could use 0.00 to produce the 3-digit number with the included decimal point.
 
Upvote 0
are you referring to S.H.A.D.O's method? for clarity for people with the same issue.
 
Upvote 0

Forum statistics

Threads
1,214,904
Messages
6,122,169
Members
449,070
Latest member
webster33

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top