I am trying to write a macro that deletes rows based on certain criteria. I have rows with the word "Summary:" in it that I want to keep (no problem). My issue is that i then have rows that all begin with "Application:". What comes after that is different (i.e. Application: Start, Application: End). I need help creating this wildcard search as I have tried with no succes. This is what I have so far:
![]()
Sub A() Set objExcel = CreateObject("Excel.Application") objExcel.Visible = True Set objWorkbook = objExcel.Workbooks.Open("C:\Documents and Settings\MANNM4\Desktop\Copy of appt center (dec 2009)-test") i = 1 Do Until objExcel.Cells(i, 1).Value = "Done" If objExcel.Cells(i, 1).Value <> "Summary:" And objExcel.Cells(i, 2).Value <> "Offered" Then Set objRange = objExcel.Cells(i, 1).EntireRow objRange.Delete i = i - 1 End If i = i + 1 Loop End Sub











LinkBack URL
About LinkBacks
Register To Reply
Bookmarks