adding zero and replace some characters

muhammad susanto

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

i have following problem like this below :

data
after formula
1998-9-253
1998.09.000253
2005-10-2035
2005.10.002035
2006-1-48
2006.01.000048
1997-2-5
1997.02.000005
etc..

<tbody>
</tbody>

criterion :
total len = 14 characters
instead mark "-" with mark "."
adding zero adjust

any assistance, thanks in advance..
please, note vba..

m.susanto
 

Excel Facts

Repeat Last Command
Pressing F4 adds dollar signs when editing a formula. When not editing, F4 repeats last command.
=LEFT(A2,4)&"."&IF(ISNUMBER(--MID(A2,6,2)),MID(A2,6,2),"0"&MID(A2,6,1))&"."&RIGHT(SUBSTITUTE(A2,"-",REPT("0",6)),6)

Greetings :)
 
Upvote 0
hi bill..

it work great!!!

a lot thanks...

any other more simpler??
 
Upvote 0

Forum statistics

Threads
1,214,968
Messages
6,122,509
Members
449,089
Latest member
RandomExceller01

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