add zero series of number formula

Tripleseas

Board Regular
Joined
Jul 12, 2022
Messages
87
Office Version
  1. 2013
Platform
  1. Windows
Hello,

i want a formula that can add leading zero after a serie of number in excel. the maximum to fill is 7 digits as shown below : thank

Classeur3
AB
1numberNumber edited
2315315 000
3312312 000
4435435 000
5536
6634
71 1791 179 000
8444
9510
10133
11424
12692
13517
141 318
151 269
16378
17155
18176
19429
20502
21702
22551
23238
241 070
Feuil1
 

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!
hi Still not getting what you want?

as per column C or D?

Book4
ABCDE
1numberNumber edited
23153150003150000000315
33123120003120000000312
44354350004350000000435
55365360000000536
66346340000000634
71179117900011790000001179
84444440000000444
95105100000000510
101331330000000133
114244240000000424
126926920000000692
135175170000000517
14131813180000001318
15126912690000001269
163783780000000378
171551550000000155
181761760000000176
194294290000000429
205025020000000502
217027020000000702
225515510000000551
232382380000000238
24107010700000001070
25
Sheet1
Cell Formulas
RangeFormula
C2:C24C2=A2*1000
 
Upvote 0
It looks like the spaces in the example are done with custom formatting, so this formula should work correctly.
Excel Formula:
=--LEFT(A2&"0000000",7)
If you have actual spaces in the formula then it will most likely not work.

edit: ignore this, I think @Sufiyan97 is closer.

For future reference, those are trailing zeros, not leading (which go in front of the number as per column D in the post above).
 
Upvote 0
t
hi Still not getting what you want?

as per column C or D?

Book4
ABCDE
1numberNumber edited
23153150003150000000315
33123120003120000000312
44354350004350000000435
55365360000000536
66346340000000634
71179117900011790000001179
84444440000000444
95105100000000510
101331330000000133
114244240000000424
126926920000000692
135175170000000517
14131813180000001318
15126912690000001269
163783780000000378
171551550000000155
181761760000000176
194294290000000429
205025020000000502
217027020000000702
225515510000000551
232382380000000238
24107010700000001070
25
Sheet1
Cell Formulas
RangeFormula
C2:C24C2=A2*1000
Thanks its column C. worked great
 
Upvote 0
It looks like the spaces in the example are done with custom formatting, so this formula should work correctly.
Excel Formula:
=--LEFT(A2&"0000000",7)
If you have actual spaces in the formula then it will most likely not work.

edit: ignore this, I think @Sufiyan97 is closer.

For future reference, those are trailing zeros, not leading (which go in front of the number as per column D in the post above).
thank you for the information sufyan method worked great. thanks
 
Upvote 0
Hello,
the maximum to fill is 7 digits as shown below : thank

If you have any change that the number in column A is more than 5 digit than my suggestion will not meet you condition of max 7 digits,
In that case jasonb's formula will work perfect.
 
Upvote 0
In that case jasonb's formula will work perfect.
Not quite, it would have to be changed to
Excel Formula:
=--LEFT(A2&"000",7)
my original suggestion would have added too many zeros to any numbers less than 4 digits.
 
Upvote 0
If you look at the first examples the result should only be 6 digits. Without the change the formula would have incorrectly returned 7 for those.

Personally, I think that your method of multiplying by 1000 is more accurate in line with what appears to be required rather than what was asked for. With the wording of the OP's question I had filled everything to 7 digits and not noticed the error until I looked at your suggestion after posting mine.
 
Upvote 0

Forum statistics

Threads
1,215,139
Messages
6,123,264
Members
449,093
Latest member
Vincent Khandagale

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