I have set up a worksheet change event that will run a specific macro when a number is put in a specific cell.
Private Sub Worksheet_Change(ByVal Target As Range)
If [d1] = 1 Then
If [d1] = 2 Then
macro1 deletes row 5&6
macro2 deletes row 7&8
When I put 1 in cell D1, excel runs macro1, just like it should, however it will not stop running. It repeatedly runs macro1 again & again & again until I get an error message. I assume because every time macro1 deletes a row in the worksheet it is a worksheet change, so it runs the macro again & again & again. How do I get it to run just once? or some other fix?