Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,339
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 21
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Row select mode to highlight active row of active cell Bart Fay[_2_] Excel Discussion (Misc queries) 0 May 11th 10 09:34 PM
How do I get row and column of active cell to highlight? chappi Excel Discussion (Misc queries) 2 August 19th 09 10:21 PM
Active Cell Highlight Bill_17256 Excel Discussion (Misc queries) 6 April 24th 09 11:00 PM
How do I highlight the active row and column headers? GaryW Setting up and Configuration of Excel 2 August 29th 07 03:26 PM
How to set highlight for the column&row header of the active cell Jasmine Excel Worksheet Functions 1 January 14th 06 03:33 PM


All times are GMT +1. The time now is 01:31 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"