This code works well and fits the purpose, but there is a problem column - "P" - the formatting of the text is, by example
76: 11-9-13
(maximum 3 digits in all 4 sections, always numbers, with a space after the colon)
I am looking for any pathway that does not end like this....
45050.46111 or 01-01-23 10.01
I'm thinking the solution must begin with an accurate custom format...
Unless there is a way to use both delimiters ( : - ) and separate the data into four number formatted columns, which could be placed to the right of the far right column (it is a fixed csv file, always containing 18 columns, ending at column R.)
A solution which ends in the correct text - through creative formatting - would also be a great result. (i have been toiling away at this for a while.)
Any help would be greatly appreciated.
76: 11-9-13
(maximum 3 digits in all 4 sections, always numbers, with a space after the colon)
I am looking for any pathway that does not end like this....
45050.46111 or 01-01-23 10.01
I'm thinking the solution must begin with an accurate custom format...
Unless there is a way to use both delimiters ( : - ) and separate the data into four number formatted columns, which could be placed to the right of the far right column (it is a fixed csv file, always containing 18 columns, ending at column R.)
A solution which ends in the correct text - through creative formatting - would also be a great result. (i have been toiling away at this for a while.)
Any help would be greatly appreciated.
Excel Formula:
Sub CombineCsvs()
Dim FolderPath As String
Dim FileName As String
Dim wbResult As Workbook
Dim WB As Workbook
FolderPath = "D:\Aible\bin\Merge"
If FolderPath Like "*[!\/]" Then
FolderPath = FolderPath & "/"
End If
FileName = Dir(FolderPath & "*.csv")
Set wbResult = Workbooks.Add
Application.DisplayAlerts = False
Application.ScreenUpdating = False
Do While FileName <> vbNullString
Set WB = Workbooks.Open(FolderPath & FileName)
WB.ActiveSheet.UsedRange.Copy wbResult.ActiveSheet.UsedRange.Rows(wbResult.ActiveSheet.UsedRange.Rows.Count).Offset(1).Resize(1)
WB.Close False
FileName = Dir()
Loop
wbResult.ActiveSheet.Rows(1).EntireRow.Delete
Application.ScreenUpdating = True
Application.DisplayAlerts = True
End Sub