help : adding zeo number

muhammad susanto

Well-known Member
Joined
Jan 8, 2013
Messages
1,766
Office Version
  1. 2016
  2. 2010
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
 

Some videos you may like

Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.

FormR

MrExcel MVP
Joined
Aug 18, 2011
Messages
6,464
Office Version
  1. 365
Platform
  1. Windows
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
 

muhammad susanto

Well-known Member
Joined
Jan 8, 2013
Messages
1,766
Office Version
  1. 2016
  2. 2010
Platform
  1. Windows
FormR, it's awesome...i'am glad now...

many-many thanks!!!!:)
 

XOR LX

Well-known Member
Joined
Jul 2, 2012
Messages
4,517
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
 

Watch MrExcel Video

Forum statistics

Threads
1,122,233
Messages
5,594,963
Members
413,954
Latest member
mrsandy

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
Top