PDA

View Full Version : [SOLVED:] Return to Cell in Column A after entering value in Column Z



psctornado
07-09-2020, 11:39 AM
Hi,

I've been struggling with coming up with VBA code so that anytime a value is entered in column Z that the cursor returns to column A one row below where the entry was in Z.

Example : Cell Z5 Value = 1.5

After entering that value it then returns to cell A6.

Does anyone have any ideas if this is possible & how to do it?

Thanks!

Paul_Hossler
07-09-2020, 01:21 PM
Put this in the worksheet code module for the affected sheet




Option Explicit


Private Sub Worksheet_Change(ByVal Target As Range)
With Target.Cells(1, 1)
If .Column <> 26 Then Exit Sub
Application.Goto .Offset(1, -25), False
End With
End Sub

psctornado
07-09-2020, 01:44 PM
Put this in the worksheet code module for the affected sheet




Option Explicit


Private Sub Worksheet_Change(ByVal Target As Range)
With Target.Cells(1, 1)
If .Column <> 26 Then Exit Sub
Application.Goto .Offset(1, -25), False
End With
End Sub




Excellent. I was using an activecell formula similar but it wasn't working. This is perfect. Thanks for the help!