Intersections

V

Voodoodan

Hi,

Is there any way in which I could click in any cell on a workbook and
the column would highlight up to that cell, and the row would also
highlight up to that cell?

It's something that might make data entry a lot easier when viewing a
couple of documents at the same time!

Dan.
 
B

Brian Synowiec

Try putting this in ThisWorkbook module:

Private Sub Workbook_SheetSelectionChange(ByVal Sh As Object, ByVal Target
As Range)
Sh.Cells.Interior.ColorIndex = xlNone
If Target.Cells.Count = 1 Then
With Rows(Target.Row).Interior
.ColorIndex = 6
.Pattern = xlSolid
End With
End If
If Target.Cells.Count = 1 Then
With Columns(Target.Column).Interior
.ColorIndex = 6
.Pattern = xlSolid
End With
End If
End Sub
 
D

dominicb

Good afternoon Voododan

It's certainly possible, although there are issues with running cod
that is constantly updated in that this would constantly clear the und
stack - if you make a mistake, there is no undo facility to fall bac
on. Chip Pearson provides a routine to run to do this here:

http://www.cpearson.com/excel/excelM.htm#HighlightActiveCell

Although he has written an add-in that's much more enhanced - and free
so try that.

HTH

Dominic
 
Top