adding zero and replace some characters

muhammad susanto

Well-known Member
Joined
Jan 8, 2013
Messages
2,046
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

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.

billszysz

Active Member
Joined
Feb 26, 2014
Messages
384
Office Version
  1. 365
=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

muhammad susanto

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

it work great!!!

a lot thanks...

any other more simpler??
 
Upvote 0

Forum statistics

Threads
1,190,693
Messages
5,982,327
Members
439,773
Latest member
tyruschen

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