Oh man...
Ok, I'm trying to write some VBA that will scan through approximately 16,000 lines of code in a .csv sheet and delete any row where the value in column C does not contain .htm
Here's a sample of the text in the .csv sheet:
The IP Address (actual values changed for security reasons) is in column A.
example: 1.1.11.111
The time and date is in column B.
example: [18/Apr/2011:05:56:17 -0400]
The rest is in column C.
GET /...path.../whskin_tbars.htm HTTP/1.1
GET /...path.../whproxy.js HTTP/1.1
...and so on.
I am using the following code. It scans the file, but then it ends up deleting every row...
Any thoughts on how to fix this?
Ok, I'm trying to write some VBA that will scan through approximately 16,000 lines of code in a .csv sheet and delete any row where the value in column C does not contain .htm
Here's a sample of the text in the .csv sheet:
The IP Address (actual values changed for security reasons) is in column A.
example: 1.1.11.111
The time and date is in column B.
example: [18/Apr/2011:05:56:17 -0400]
The rest is in column C.
GET /...path.../whskin_tbars.htm HTTP/1.1
GET /...path.../whproxy.js HTTP/1.1
...and so on.
I am using the following code. It scans the file, but then it ends up deleting every row...
Code:
Do Until ActiveCell.Value = ""
Workbooks.Open Filename:=ActiveCell.Value
Range("C1").Select
Do Until ActiveCell.Value = ""
If ActiveCell.Value = "*htm HTTP/1.1" Then
ActiveCell.Offset(1, 0).Activate
Else
ActiveCell.EntireRow.Delete
End If
Loop
Windows("KR Page Access Report Generator.xls").Activate
ActiveCell.Offset(1, 0).Activate
Loop
Any thoughts on how to fix this?
Last edited: