Hi,
I have a text file that is formatted in a way like this:
Department #
Responsible person:
labor distribution
Here is my code so far:
Sheets("Sheet3").Select
Range("A1").Select
Open "C:\Documents and Settings\Kevin\desktop\ebc440.txt" For Input As #1
texttofind = "DEPARTMENT 33290"
Do Until EOF(1)
Line Input #1, data
If InStr(1, data, texttofind) Then
ActiveCell.Offset(r, 0) = data
r = r + 1
End If
Loop
Close
How do I code it so that I can add more criteria like "labor" and "responsible person" and not just the department 33290". Please help, thanks in advance!
Bookmarks