ndendrinos
02-02-2011, 07:09 PM
Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Range("F17:F35")) Is Nothing Then
ActiveCell.Offset(-1, -3).Select 'Selects cell in same Row, 3 Columns LEFT
Selection.Copy
ActiveCell.Offset(0, 3).Select
Selection.PasteSpecial Paste:=xlPasteFormats
End If
End Sub
two questions & one problem with above
1) ActiveCell.Offset(-1, -3).Select keeps me on the same row (0,3)does not... any idea why?
2) Why after running the code the cursor always chooses [F16]... any idea why?
3) If the value change in [F17:F35] is due to direct input then the code works
If the value changes because of a formula it does not.
Can this be addressed so
that the code will work if the change is caused by a formula?
Many thanks
If Not Intersect(Target, Range("F17:F35")) Is Nothing Then
ActiveCell.Offset(-1, -3).Select 'Selects cell in same Row, 3 Columns LEFT
Selection.Copy
ActiveCell.Offset(0, 3).Select
Selection.PasteSpecial Paste:=xlPasteFormats
End If
End Sub
two questions & one problem with above
1) ActiveCell.Offset(-1, -3).Select keeps me on the same row (0,3)does not... any idea why?
2) Why after running the code the cursor always chooses [F16]... any idea why?
3) If the value change in [F17:F35] is due to direct input then the code works
If the value changes because of a formula it does not.
Can this be addressed so
that the code will work if the change is caused by a formula?
Many thanks