ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Visual Reference, row and column crosshairs (https://www.excelbanter.com/excel-discussion-misc-queries/21908-visual-reference-row-column-crosshairs.html)

John - Vanguard

Visual Reference, row and column crosshairs
 
Does anybody know how to have the row and column change colors as you move
the active cell around the worksheet, like crosshairs for a quick visual
reference.

Ragdyer

Check out Chip Pearson's Add-In that does exactly what you're looking for:

http://www.cpearson.com/excel/RowLiner.htm
--
HTH,

RD

---------------------------------------------------------------------------
Please keep all correspondence within the NewsGroup, so all may benefit !
---------------------------------------------------------------------------
"John - Vanguard" <John - wrote in
message ...
Does anybody know how to have the row and column change colors as you move
the active cell around the worksheet, like crosshairs for a quick visual
reference.



Peter Rooney

John,

Here's what you need - it will highlight either the row or the column - not
sure about both yet - This is Chip Pearson's code, modified a little bit, so
i don't really take any credit for it! Just remember to paste it into the
code window of the worksheet you want it to work on - not a normal Visual
Basic module!

Cheers

Pete



Option Explicit

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Cells.FormatConditions.Delete
'-------------------------------------------------------------------------
'Comment out one of these two lines to highlight
'either the selected row or the selected column
With Target.EntireRow
'With Target.EntireColumn
'-------------------------------------------------------------------------
.FormatConditions.Add Type:=xlExpression, Formula1:="TRUE"
With .FormatConditions(1)
With .Borders(xlTop)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = 10
End With
With .Borders(xlBottom)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = 10
End With
End With
.FormatConditions(1).Interior.ColorIndex = 20
End With
End Sub



"John - Vanguard" wrote:

Does anybody know how to have the row and column change colors as you move
the active cell around the worksheet, like crosshairs for a quick visual
reference.



All times are GMT +1. The time now is 04:09 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com