I would like a macro, that runs when a cell with the text value "DELETE" is clicked, and deletes entire the range of rows from one cell above and 19 cells below the cell with the value "DELETE".
For example if cell X7 has the value "DELETE", when it is clicked rows 6:26 are deleted.
The code I have so far is:
Private Sub Delete_Type(ByVal Target As Excel.Range)
If Target.Address = "$X$7" Then
Rows("(Row(), Column(),1, 4):((Row(), Column(), 4)+19)").Select
Selection.delete Shift:=xlUp
End If
End Sub
