Open "D:\6\123.txt" For Input As #1 Do On Error Resume Next Line Input #1, str1 i = i + 1 If i = 3 Or i = 4 Or i = 8 Then Range("b65535").End(xlUp).Offset(1, 0).Value = Split(str1, ",")(3) ElseIf i > 8 Then Exit Do End If Loop Until EOF(1) Close #1 End Sub