I would like to do a macro. My testing cells are on another sheet. Sheet - (data) Macro check a range ("D2:D10")
if the cells contain value 12 if yes show me a message box "Go to add to system"
and this cell where macro found a value will be set to 0.
I have this code but it doesn't work for me I don't known why. Can you help me?
Private Sub check(ByVal Target As Range)
For Each c In Worksheet("data").Range("D2:D10")
If Range("D2:D10") = 12 Then
MsgBox "Go to add to system"
Range ("D2:D10").value = 0
End If
Next c
End Sub