Hello Steve,
When I applied this code and followed your instructions, it cleared the cells, the next time the "1" appeared nothing happened.
You actually have to run the code again.
However, a Worksheet_Change event may be a better option considering your updated explanation.
Make the following change to the code in post #2:-
Sub ClearIt()
Application.ScreenUpdating = False
Application.EnableEvents = False
If Range("T40") = 1 Then
Range("T5:T38").ClearContents
End If
Application.EnableEvents = True
Application.ScreenUpdating = True
End Sub
Now, right click on the sheet tab and select view code. In the big white field that appears, paste the following:-
Private Sub Worksheet_Change(ByVal Target As Range)
ClearIt
End Sub
You now don't need to do anything. Every time the value in T40 changes to "1", the range T5:T38 will clear.
Cheerio,
vcoolio.
Bookmarks