Hi.
I've got a formula that returns a cell address. I set up a worksheet_calculate event that's supposed to extract it (as a value) and give me the address of the cell next to the one originally returned by the formula among the other things. Sometimes it works but eventually it always crashes.
This is one of the various ways I've tried to make it work...
I've got a formula that returns a cell address. I set up a worksheet_calculate event that's supposed to extract it (as a value) and give me the address of the cell next to the one originally returned by the formula among the other things. Sometimes it works but eventually it always crashes.
This is one of the various ways I've tried to make it work...
Code:
Private Sub worksheet_calculate()
Dim i As String
Set Target = ActiveSheet.Range("d15")
If Target Is Nothing Then Exit Sub
If Range("c15").Value = "" Then Exit Sub
i = Range(Range("d15").Value).Offset(0, 1).Address(False, False)
Range("e15").Value = "'=SE(E(" & i & "<>"""";" & i & "<>""F"");VERO;FALSO)"
End Sub