M
Mitchell_Collen via OfficeKB.com
Hi all.
The code pasted below works only it will not search and delete every row
equal to user value. I have had to press ctrl+b, then enter value such as
'cardiac' over and over. It will delete the row where there is a cell
containing the value cardiac however, it will not delete all rows where the
row contains cardiac. There are 4000+ rows with cardiac and other words that
need to be deleted off the spreadsheet. I know it must be loop but I don't
have any syntax reference or books. Please help me. Thanks in advance. Misty
Here is the code:
Sub Macro3()
' Keyboard Shortcut: Ctrl+b
Dim userResponse
With Worksheets(1).Range("A1:H100")
userResponse = Application.InputBox("Enter a value where the rows are to be
deleted")
Set c = .Find(userResponse, LookIn:=xlValues)
If Not c Is Nothing Then
c.EntireRow.Delete
End If
End With
End Sub
The code pasted below works only it will not search and delete every row
equal to user value. I have had to press ctrl+b, then enter value such as
'cardiac' over and over. It will delete the row where there is a cell
containing the value cardiac however, it will not delete all rows where the
row contains cardiac. There are 4000+ rows with cardiac and other words that
need to be deleted off the spreadsheet. I know it must be loop but I don't
have any syntax reference or books. Please help me. Thanks in advance. Misty
Here is the code:
Sub Macro3()
' Keyboard Shortcut: Ctrl+b
Dim userResponse
With Worksheets(1).Range("A1:H100")
userResponse = Application.InputBox("Enter a value where the rows are to be
deleted")
Set c = .Find(userResponse, LookIn:=xlValues)
If Not c Is Nothing Then
c.EntireRow.Delete
End If
End With
End Sub