help : adding zeo number

muhammad susanto

Well-known Member
Joined
Jan 8, 2013
Messages
2,077
Office Version
  1. 365
  2. 2021
Platform
  1. Windows
hello all,

i have a problem to adding/insert zero number with multiple condition for this which total character number is 12

sample data (excel format general)
after formula
2005-6-12
200506000012
1997-11-7
199711000007
2001-10-358
200110000358
1985-5-4521
198505004521
2002-12-8
200212000008
etc...

<tbody>
</tbody>

it's possible with excel formula to figure out?

thanks for your helping...

m.susanto
 

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.
One possible way, based on the sample data:

Excel Workbook
AB
1sample dataafter formula
22005-6-12200506000012
31997-11-7199711000007
42001-10-358200110000358
51985-5-4521198505004521
62002-12-8200212000008
Sheet1
 
Upvote 0
An alternative:

=SUMPRODUCT((TRIM(MID(SUBSTITUTE(A2,"-",REPT(" ",255)),255*(ROW(INDIRECT("1:"&1+LEN(A2)-LEN(SUBSTITUTE(A2,"-",""))))-1)+1,255))*(10^{8;6;0})))

Regards
 
Upvote 0

Forum statistics

Threads
1,214,606
Messages
6,120,478
Members
448,967
Latest member
visheshkotha

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