Good Day
I have a short macro to run when a cell is changed in column 2.
This works, however it only executes when re-selecting the cell after any changes, rather than running when moving away from cell.
How can I get this macro to run referencing the updated cell, when moving away from this active cell?
I believe I would use ActiveCell.Address to back reference and run somehow, but cant figure it out!
---------------------------------------------------------------
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If ActiveCell.Column <> 2 Then Exit Sub
If IsNumeric(Target) Then
If ActiveCell > 0 Then
ActiveCell.Offset(0, 1).IndentLevel = 2
End If
End If
End Sub
Thank you
Andrew
I have a short macro to run when a cell is changed in column 2.
This works, however it only executes when re-selecting the cell after any changes, rather than running when moving away from cell.
How can I get this macro to run referencing the updated cell, when moving away from this active cell?
I believe I would use ActiveCell.Address to back reference and run somehow, but cant figure it out!
---------------------------------------------------------------
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If ActiveCell.Column <> 2 Then Exit Sub
If IsNumeric(Target) Then
If ActiveCell > 0 Then
ActiveCell.Offset(0, 1).IndentLevel = 2
End If
End If
End Sub
Thank you
Andrew