C
Cue
I'm tring to delete a row that has a cell that contains words but does not
contain a specific "text".
Ex. Cell A2 = Jill - Good
I want to delete Row 2 becasue Cell A2 does not contain "Bad". The Macro is
following:
Sub Delete Row()
Application.ScreenUpdating = False
Application.Calculation = xlCalculationManual
Dim lastrow As Long, r As Long
lastrow = ActiveSheet.UsedRange.Rows.Count
For r = lastrow To 1 Step -1
If Cells(r, 3).Value <> "text" Then Rows(r).Delete
Next r
Application.Calculation = xlCalculationAutomatic
Application.ScreenUpdating = True
End Sub
Can somebody show me what is missing or needed to accomplish this?
contain a specific "text".
Ex. Cell A2 = Jill - Good
I want to delete Row 2 becasue Cell A2 does not contain "Bad". The Macro is
following:
Sub Delete Row()
Application.ScreenUpdating = False
Application.Calculation = xlCalculationManual
Dim lastrow As Long, r As Long
lastrow = ActiveSheet.UsedRange.Rows.Count
For r = lastrow To 1 Step -1
If Cells(r, 3).Value <> "text" Then Rows(r).Delete
Next r
Application.Calculation = xlCalculationAutomatic
Application.ScreenUpdating = True
End Sub
Can somebody show me what is missing or needed to accomplish this?