KABOOM
asked on
Excel VBA - can't delete proper row question
What i'm trying to do is run through a bunch of rows and for each instance of the word "Mike", I want to delete that row. Problem is, I can't figure out which row i'm on. I know i'm only missing a line or two and some assistance would be greatly appreciated.
Sub testing()
For Each i In Worksheets("Sheet1").Range ("A1:A10") .Cells
If i.Value = "Mike" Then
' WHAT ROW AM I ON?????
' HOW DO I PASS IT SO I CAN DELETE IT?
ActiveCell.EntireRow.Delet e
End If
Next
End Sub
Sub testing()
For Each i In Worksheets("Sheet1").Range
If i.Value = "Mike" Then
' WHAT ROW AM I ON?????
' HOW DO I PASS IT SO I CAN DELETE IT?
ActiveCell.EntireRow.Delet
End If
Next
End Sub
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
I will leave a recommendation in the Cleanup topic area that this question is:
No response from KABOOM from 12/09/2003 comment
Award points to malharone is recommend.
Please leave any comments here within the next seven days.
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
planocz
EE Cleanup Volunteer