L
lolitafontaine
I regularly import documents from a database I use into Excel as Tex
Files, which then need to be "cleaned" up by deleteing entire rows.
have accomplished this so far via point/click/record (I'm a tota
amateur):
Do
Cells.Find(What:="-----", After:=ActiveCell, LookIn:=xlFormulas, _
LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext
_
MatchCase:=False).Activate
Selection.EntireRow.Delete
Loop
What happens now, of course, is that the macro runs thorugh the entir
document but displays an error message when it can no longer find th
serach criteria. I then exit the loop, retype in the code the nex
search term, and re-launch the macro.
I have 8 search terms to define:
1) "-----"
2) "====="
3) "Page"
4) "L I S T"
5) "Location"
6) "Cycle"
7) "Portion"
8) "Price"
I want the statements (procedures? see - I don't know nuthin') to run
each in turn, advancing within the macro after each row containing th
search term has been found and deleted.
These documents all have the same rows to be deleted, but they all var
in size and length depending upon which location I run the report for.
Any help would be greatly appreciated! Thanks
Files, which then need to be "cleaned" up by deleteing entire rows.
have accomplished this so far via point/click/record (I'm a tota
amateur):
Do
Cells.Find(What:="-----", After:=ActiveCell, LookIn:=xlFormulas, _
LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext
_
MatchCase:=False).Activate
Selection.EntireRow.Delete
Loop
What happens now, of course, is that the macro runs thorugh the entir
document but displays an error message when it can no longer find th
serach criteria. I then exit the loop, retype in the code the nex
search term, and re-launch the macro.
I have 8 search terms to define:
1) "-----"
2) "====="
3) "Page"
4) "L I S T"
5) "Location"
6) "Cycle"
7) "Portion"
8) "Price"
I want the statements (procedures? see - I don't know nuthin') to run
each in turn, advancing within the macro after each row containing th
search term has been found and deleted.
These documents all have the same rows to be deleted, but they all var
in size and length depending upon which location I run the report for.
Any help would be greatly appreciated! Thanks