Hi,
I would like the below macro to automatically run when the cell data in "M5" (on the OSAR tab in Excel) changes. "M5" is linked to another tab and when data in that tab is entered, then this cell will change values from zero to actual words. Below is my if statement the deletes 4 rows if the cell data reads "HOTL_MOTL". Can you please help me make this macro auto run when this data is changed in the cell?
Code:
Sub sbVBS_To_Delete_EntireRow()
[vb]
If Range("M5").Value <> "HOTL_MOTL" And Range("M5") <> "" Then
Rows(22).EntireRow.Delete
Rows(22).EntireRow.Delete
Rows(22).EntireRow.Delete
Rows(22).EntireRow.Delete
End If
[/vb]
End Sub
Thanks!
Bookmarks