I would like to delimit my time text to the separate columns:
I used the following approach:
VBA code for "Text to Column - Fixed Width" - loop
But I don't know how to apply it for the column range down to the last row.
My code looks like this:
Dim wks As Worksheet
Dim lRow As Long
Set wks = ThisWorkbook.ActiveSheet
lRow = wks.Range("D" & wks.Rows.Count).End(xlUp).Row
With wks
.Cells(4, lRow).TextToColumns Destination:=Range("S1"), DataType:=xlDelimited, _
TextQualifier:=xlDoubleQuote, ConsecutiveDelimiter:=True, _
Semicolon:=True, Space:=False
.Range("S1").CurrentRegion.Columns.AutoFit
End With
And I am getting an error:
No data was selected to parse.
How can I make it work with my range of cells?