Hi, I have a syntax issue to perform a code.
I have a certain amount of cells (not contiguous).
I want that when the user changes the value contained in any of those cells, a certain action is performed according to the specific cell selected.
Now, I've been able to do this with the following code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address(0, 0) = "O7" Then
ActiveCell.Offset(-1, 0).Select
Call DEF_NoSTAZ_POS1
Else
If Target.Address(0, 0) = "O74" Then
ActiveCell.Offset(-1, 0).Select
Call DEF_NoSTAZ_POS2
Else
If Target.Address(0, 0) = "F11" Or Target.Address(0, 0) = "N11" Or Target.Address(0, 0) = "V11" Then
ActiveCell.Offset(0, 0).Select
Call SUCC_AUTO
End If
End If
End If
End Sub
I guess there is a better syntax for this. I tried to use the "Case select" syntax, but I don't know how to in this particular case.
Especially, for the last call of the code above, it is annoying because the cells I have to assign to the "SUCC_AUTO" macro are more than the ones presented (F11, N11, V11 and other 150 cells on the same columns but on other rows).
Any idea to help?
Thanks in advance.
Raf
Bookmarks