PDA

View Full Version : [SOLVED:] Need help creating a macro that produces a dual cursor



estatefinds
08-14-2016, 05:42 PM
I have a worksheet in which I have data in which I would need to be looking at both types of data.
The type of data relates but need to be able to select data with cursor and it also selects the data equal distance across work sheet.

I have attached a file.
So in column L8 I select cell with a cursor and automatically the cell in column V8 will be selected at the same time.

Also if possible if I select the cell in the U2:AB71 range it would select the in same fashion cell in the range K2:R71. Dual Selection box

Thank you very much in advance for the help!!:)

mikerickson
08-14-2016, 07:03 PM
You might put this in the Sheet's code module.
But only one cell can be active at a time, to get to the other cell you'll have to Tab.


Private Sub Worksheet_SelectionChange(ByVal Target As Range)
With Target
If .Cells.Count = 1 Then
If Not Application.Intersect(Target, Range("K:R")) Is Nothing Then
Application.EnableEvents = False
Application.Union(.Cells(1, 1), .Offset(0, 10)).Select
Application.EnableEvents = True
End If
If Not Application.Intersect(Target, Range("U:AB")) Is Nothing Then
Application.EnableEvents = False
Application.Union(.Cells(1, 1), .Offset(0, -10)).Select
Application.EnableEvents = True
End If
End If
End With
End Sub

estatefinds
08-15-2016, 03:24 AM
Excellent Work!!! Thank you Very much!!!!:)