I am trying to write a Macro that will evaluate the contents of a cloumn and delete the entire row if the value in a cell meets a certain criteria. Here is what I have so far:
Sub Delete_Row()
Dim Mvalue
Range(A1).select
Do Until Mvalue = Null
Mvalue = ActiveCell.Value
If (ActiveCell.Value = 2)Then
'(I would like to be able to control this value)
'Need to know how to select and delete row
End If
ActiveCell.Offset(1,0).select
Loop
End Sub
Appreciate any help
Sub Delete_Row()
Dim Mvalue
Range(A1).select
Do Until Mvalue = Null
Mvalue = ActiveCell.Value
If (ActiveCell.Value = 2)Then
'(I would like to be able to control this value)
'Need to know how to select and delete row
End If
ActiveCell.Offset(1,0).select
Loop
End Sub
Appreciate any help