Hi ,
I have the below code and it is working as expected except that it is also deleting the activecell row, I only want to delete the two rows above and leave the row of the activecell.
Can someone advise what I need to change in the offset so the activecell row is not deleted?
I have the below code and it is working as expected except that it is also deleting the activecell row, I only want to delete the two rows above and leave the row of the activecell.
Can someone advise what I need to change in the offset so the activecell row is not deleted?
VBA Code:
Sub Find_Ex1()
Range("A:A").Find(What:="Renewal / Collected").Select
ActiveCell.Offset(2, 2).Range("A1").Select
If IsNumeric(ActiveCell.Value) And ActiveCell.Value <> 0 Then
MsgBox "Is a number and is not equal to zero"
Else
Range(ActiveCell.Row & ":" & ActiveCell.Offset(-2, 0).Row).Select
Selection.Delete Shift:=xlUp
End If
End Sub