jondavis1987
Active Member
- Joined
- Dec 31, 2015
- Messages
- 443
- Office Version
- 2019
- Platform
- Windows
So i'm trying to code it where if I enter data into certain cells and hit enter it will take me to a another specific cell. The code that I have will work when I hit enter at the specific cells. The problem is it jumps me to other cells when not on target. For instance If I enter data in D34 and hit enter it takes me to C38. Just like I want it to. But every time I enter data and hit enter in cells C38 and C39 it takes me back to C38. It's not until i get back down to C40 which is another target that it takes me to the cell I told it to.
VBA Code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Not Target.Count > 1 Then
If Target = [B21] Then
Application.Goto [B24]
If Target = [B29] Then
Application.Goto [E26]
If Target = [E26] Then
Application.Goto [B33]
If Target = [B34] Then
Application.Goto [D34]
If Target = [D34] Then
Application.Goto [C38]
If Target = [C40] Then
Application.Goto [D38]
If Target = [D40] Then
Application.Goto [C46]
If Target = [C49] Then
Application.Goto [D46]
End If
End If
End If
End If
End If
End If
End If
End If
End If
End Sub