Hi sebastianfrench
Do you have a sample Text file?
Some script from John Walkenback that may help?
Sub ImportRange2()
Set ImpRng = ActiveCell
On Error Resume Next
Open ThisWorkbook.Path & "\textfile.txt" For Input As #1
If Err <> 0 Then
MsgBox "Not found: " & ThisWorkbook.Path & "\textfile.txt", vbCritical, "ERROR"
Exit Sub
End If
r = 0
c = 0
txt = ""
Application.ScreenUpdating = False
Do While Not EOF(1)
Line Input #1, data
For i = 1 To Len(data)
char = Mid(data, i, 1)
If char = "," Or i = Len(data) Then
ActiveCell.Offset(r, c) = txt
c = c + 1
txt = ""
Else
If char <> Chr(34) Then _
txt = txt & Mid(data, i, 1)
End If
Next i
c = 0
r = r + 1
Loop
Close #1
Application.ScreenUpdating = True
End Sub
Bookmarks