• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Date format problem

Villalobos

Active Member
Hello,

I would need your help to solve a date format problem. I use the below mentioned code but doesn't work well.

Code:
Option Explicit
Sub Test()
Dim OutputSheet1 As Worksheet
Dim OutputLastRow1 As Long

Set OutputSheet1 = Worksheets("Calculation")

  With OutputSheet1
  OutputLastRow1 = .Cells(.Rows.Count, "E").End(xlUp).Row
  .Range("F9:F" & OutputLastRow1).Replace What:=".", Replacement:="/"
  .Range("F9:F" & OutputLastRow1).NumberFormat = "dd/mm/yyyy"
  End With
 
End Sub

I extract the dates from the ERP in this format : dd.mm.yyyy, and my target to convert into this format: dd/mm/yyyy but I can not do it. My OP system use this date format also: dd/mm/yyyy.

I have attached the sample file.

Thank you in advance the help!
 

Attachments

  • sample.xlsm
    18 KB · Views: 5
Back
Top