Advertisement
Guest User

Untitled

a guest
Jul 16th, 2019
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. Option Explicit
  2.  
  3. Private Sub Worksheet_Change(ByVal Target As Range)
  4. Application.EnableEvents = False
  5. Dim My_col#, My_ro#
  6. If Target.Count = 1 Then
  7. Select Case Target.Column
  8. Case 7: My_col = 1: My_ro = Target.Row + 1
  9. Case 1: My_col = 7: My_ro = Target.Row
  10. End Select
  11. End If
  12. Cells(My_ro, My_col).Select
  13. Application.EnableEvents = True
  14. End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement