参考:http://club.excelhome.net/thread-611946-2-1.html
效果
-----------------------------------------------
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
For Each c In Shapes
c.Delete
Next
Cells.Interior.Color = xlNone
Set Rng = Cells.Find(Target, , , xlWhole, xlByColumns)
For i = Rng.Column + 1 To [iv1].End(xlToLeft).Column
Set rng1 = Columns(i).Find(Target, , , xlWhole)
If Not rng1 Is Nothing Then
With Sheets(1).Shapes.AddLine(Rng.Left + 25, Rng.Top + 6, rng1.Left + 25, rng1.Top + 6).Line
.Weight = 3
.ForeColor.RGB = RGB(255, 0, 0)
End With
Rng.Interior.ColorIndex = 15
rng1.Interior.ColorIndex = 15
Set Rng = rng1
End If
Next
End Sub