D
Dileep Chandran
To the masters of the excel:
I have the following macro. How can I change the range to look up form
(a:a) to multiple ranges. say like Column A, B, C, X, Y and Z?
Sub DeleteRows()
Dim myWord As String
Dim FoundCell As Range
Dim wks As Worksheet
Set wks = Worksheets("sheet1")
myWord = "Test"
With wks.Range("a:a")
Do
Set FoundCell = .Cells.Find(what:=myWord, _
after:=.Cells(.Cells.Count), _
lookat:=xlWhole, MatchCase:=False)
If FoundCell Is Nothing Then
Exit Do
Else
FoundCell.EntireRow.Delete
End If
Loop
End With
Can anyone help me?
Thanks
-Dileep Chandran
End Sub
I have the following macro. How can I change the range to look up form
(a:a) to multiple ranges. say like Column A, B, C, X, Y and Z?
Sub DeleteRows()
Dim myWord As String
Dim FoundCell As Range
Dim wks As Worksheet
Set wks = Worksheets("sheet1")
myWord = "Test"
With wks.Range("a:a")
Do
Set FoundCell = .Cells.Find(what:=myWord, _
after:=.Cells(.Cells.Count), _
lookat:=xlWhole, MatchCase:=False)
If FoundCell Is Nothing Then
Exit Do
Else
FoundCell.EntireRow.Delete
End If
Loop
End With
Can anyone help me?
Thanks
-Dileep Chandran
End Sub