Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to highlight active row and column?
I have a very large table and I am hoping to find a way to highligh the
current row and coloum somehow to allow a crosshair like look that follows the active cell. The table is a look up table and following the lines can be a pain even with grided shading. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to highlight active row and column?
Try:
ActiveCell.EntireRow.Interior.ColorIndex = 4 ActiveCell.EntireColumn.Interior.ColorIndex = 7 HTH "Ricktaxx" wrote: I have a very large table and I am hoping to find a way to highligh the current row and coloum somehow to allow a crosshair like look that follows the active cell. The table is a look up table and following the lines can be a pain even with grided shading. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to highlight active row and column?
'----------------------------------------------------------------
Private Sub WorkSheet_SelectionChange(ByVal Target As Range) '---------------------------------------------------------------- Cells.FormatConditions.Delete With Target.EntireRow .FormatConditions.Add Type:=xlExpression, Formula1:="TRUE" .FormatConditions(1).Interior.ColorIndex = 35 End With With Target.EntireColumn .FormatConditions.Delete .FormatConditions.Add Type:=xlExpression, Formula1:="TRUE" .FormatConditions(1).Interior.ColorIndex = 35 End With With Target .FormatConditions.Delete .FormatConditions.Add Type:=xlExpression, Formula1:="TRUE" .FormatConditions(1).Interior.ColorIndex = 36 End With End Sub 'This is worksheet event code, which means that it needs to be 'placed in the appropriate worksheet code module, not a standard 'code module. To do this, right-click on the sheet tab, select -- HTH RP (remove nothere from the email address if mailing direct) "Ricktaxx" wrote in message ... I have a very large table and I am hoping to find a way to highligh the current row and coloum somehow to allow a crosshair like look that follows the active cell. The table is a look up table and following the lines can be a pain even with grided shading. |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to highlight active row and column?
That is way too cool
Thanks BOB, I will use it too AvP "Bob Phillips" wrote in message ... '---------------------------------------------------------------- Private Sub WorkSheet_SelectionChange(ByVal Target As Range) '---------------------------------------------------------------- Cells.FormatConditions.Delete With Target.EntireRow .FormatConditions.Add Type:=xlExpression, Formula1:="TRUE" .FormatConditions(1).Interior.ColorIndex = 35 End With With Target.EntireColumn .FormatConditions.Delete .FormatConditions.Add Type:=xlExpression, Formula1:="TRUE" .FormatConditions(1).Interior.ColorIndex = 35 End With With Target .FormatConditions.Delete .FormatConditions.Add Type:=xlExpression, Formula1:="TRUE" .FormatConditions(1).Interior.ColorIndex = 36 End With End Sub 'This is worksheet event code, which means that it needs to be 'placed in the appropriate worksheet code module, not a standard 'code module. To do this, right-click on the sheet tab, select -- HTH RP (remove nothere from the email address if mailing direct) "Ricktaxx" wrote in message ... I have a very large table and I am hoping to find a way to highligh the current row and coloum somehow to allow a crosshair like look that follows the active cell. The table is a look up table and following the lines can be a pain even with grided shading. |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to highlight active row and column?
Improved version (IMO)
'---------------------------------------------------------------- Private Sub WorkSheet_SelectionChange(ByVal Target As Range) '---------------------------------------------------------------- Cells.FormatConditions.Delete With Target With .EntireRow .FormatConditions.Add Type:=xlExpression, Formula1:="TRUE" With .FormatConditions(1) With .Borders(xlTop) .LineStyle = xlContinuous .Weight = xlThin .ColorIndex = 5 End With With .Borders(xlBottom) .LineStyle = xlContinuous .Weight = xlThin .ColorIndex = 5 End With .Interior.ColorIndex = 20 End With End With With .EntireColumn .FormatConditions.Delete .FormatConditions.Add Type:=xlExpression, Formula1:="TRUE" With .FormatConditions(1) With .Borders(xlLeft) .LineStyle = xlContinuous .Weight = xlThin .ColorIndex = 5 End With With .Borders(xlRight) .LineStyle = xlContinuous .Weight = xlThin .ColorIndex = 5 End With .Interior.ColorIndex = 20 End With End With .FormatConditions.Delete .FormatConditions.Add Type:=xlExpression, Formula1:="TRUE" .FormatConditions(1).Interior.ColorIndex = 36 End With End Sub -- HTH RP (remove nothere from the email address if mailing direct) "Bob Phillips" wrote in message ... '---------------------------------------------------------------- Private Sub WorkSheet_SelectionChange(ByVal Target As Range) '---------------------------------------------------------------- Cells.FormatConditions.Delete With Target.EntireRow .FormatConditions.Add Type:=xlExpression, Formula1:="TRUE" .FormatConditions(1).Interior.ColorIndex = 35 End With With Target.EntireColumn .FormatConditions.Delete .FormatConditions.Add Type:=xlExpression, Formula1:="TRUE" .FormatConditions(1).Interior.ColorIndex = 35 End With With Target .FormatConditions.Delete .FormatConditions.Add Type:=xlExpression, Formula1:="TRUE" .FormatConditions(1).Interior.ColorIndex = 36 End With End Sub 'This is worksheet event code, which means that it needs to be 'placed in the appropriate worksheet code module, not a standard 'code module. To do this, right-click on the sheet tab, select -- HTH RP (remove nothere from the email address if mailing direct) "Ricktaxx" wrote in message ... I have a very large table and I am hoping to find a way to highligh the current row and coloum somehow to allow a crosshair like look that follows the active cell. The table is a look up table and following the lines can be a pain even with grided shading. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Row select mode to highlight active row of active cell | Excel Discussion (Misc queries) | |||
How do I get row and column of active cell to highlight? | Excel Discussion (Misc queries) | |||
Active Cell Highlight | Excel Discussion (Misc queries) | |||
How do I highlight the active row and column headers? | Setting up and Configuration of Excel | |||
How to set highlight for the column&row header of the active cell | Excel Worksheet Functions |