I’m trying to get the following code in my worksheet to work. At the moment it does nothing.
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address(False, False) = "j4" Then
Application.EnableEvents = False
If Target.Value = 0 Then
Range("j5").Value = 1
Else
Range("j5").Value = 2
End If
Application.EnableEvents = True
End If
End Sub
The code’s placed in the worksheet, and the macro security is set to “Enable all macros”.
I’m using the 64-bit version of excel 2010.
Thank you for any help you can offer.
James
The issue is your first
Ifstatement. The following code should work for you: