Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
ktho07
 
Posts: n/a
Default Highlight column headings when cursor is in a cell.

When navigating a spreadsheet (e.g. cursor is placed in B12), I would like
the letter Column Heading "B" and the Row Heading "12" to highlight in a
different color other than standard gray. When moving cursor, each
Heading/Row you pass through would change to a specified color - then
returning to gray once you leave the cell.
  #2   Report Post  
Bob Phillips
 
Posts: n/a
Default

It already goes bold.

Perhaps this alternative might help


'----------------------------------------------------------------
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


'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
'the View Code option from the menu, and paste the code in.

--

HTH

RP
(remove nothere from the email address if mailing direct)


"ktho07" wrote in message
...
When navigating a spreadsheet (e.g. cursor is placed in B12), I would like
the letter Column Heading "B" and the Row Heading "12" to highlight in a
different color other than standard gray. When moving cursor, each
Heading/Row you pass through would change to a specified color - then
returning to gray once you leave the cell.



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
Find a empty cell in next column Michael Excel Discussion (Misc queries) 3 June 15th 05 02:18 PM
can't highlight cell - highlights only cell's row and column MM Excel Discussion (Misc queries) 1 June 14th 05 02:41 PM
How do I reference every "n" cell in a column in Excel? Alma Excel Worksheet Functions 2 March 22nd 05 06:19 PM
how to highlight current row & column automatically by a color iffi Excel Discussion (Misc queries) 1 February 6th 05 06:30 PM
GET.CELL Biff Excel Worksheet Functions 2 November 24th 04 07:16 PM


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

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

About Us

"It's about Microsoft Excel"