Nguyen Anh Dung
Board Regular
- Joined
- Feb 28, 2020
- Messages
- 180
- Office Version
- 2016
- Platform
- Windows
I have the following code when running then collected into one cell!
i want keep as picture below
Code:
Sub CSVAmend2(FolderPath As String, FileName As String)
Dim wb As Workbook, ws As Worksheet, rng As Range
Set wb = Workbooks.Open(FolderPath & FileName)
Set ws = wb.Sheets(1)
Application.DisplayAlerts = False
Columns("F").Replace What:="T", Replacement:=" "
Columns("F").Replace What:="Z", Replacement:=""
wb.Worksheets(1).Columns("f:f").NumberFormat = "yyyy-mm-dd hh:mm:ss"
ws.Range("A1:AE48").SpecialCells(xlCellTypeVisible).Delete
ws.Range("G49:Z49").EntireColumn.Delete
Application.DisplayAlerts = True
wb.Close SaveChanges:=True
End Sub
i want keep as picture below