Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Is there a way to highlight a cell (different color) when it's selected.
For example, cell A1 becomes yellow when selected? However, once I select a different cell the new cell become yellow and A1 goes back to white. Thanks. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi
see: http://www.cpearson.com/excel/RowLiner.htm -- Regards Frank Kabel Frankfurt, Germany "Vlad" schrieb im Newsbeitrag om... Is there a way to highlight a cell (different color) when it's selected. For example, cell A1 becomes yellow when selected? However, once I select a different cell the new cell become yellow and A1 goes back to white. Thanks. |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Vlad,
Here is one way that highlights the row and column of the activecell. Not in your colours but you can adapt to suit 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 'the View Code option from the menu, and paste the code in. -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "Vlad" wrote in message om... Is there a way to highlight a cell (different color) when it's selected. For example, cell A1 becomes yellow when selected? However, once I select a different cell the new cell become yellow and A1 goes back to white. Thanks. |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Bob and Frank,
Thanks a lot. This is exactly what I was looking for. "Bob Phillips" wrote in message ... Vlad, Here is one way that highlights the row and column of the activecell. Not in your colours but you can adapt to suit 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 'the View Code option from the menu, and paste the code in. -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "Vlad" wrote in message om... Is there a way to highlight a cell (different color) when it's selected. For example, cell A1 becomes yellow when selected? However, once I select a different cell the new cell become yellow and A1 goes back to white. Thanks. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
highlighting cell | Excel Discussion (Misc queries) | |||
Highlighting a cell | Excel Discussion (Misc queries) | |||
Highlighting cell | Excel Discussion (Misc queries) | |||
Highlighting A Cell | Excel Discussion (Misc queries) | |||
Highlighting blanks via GO TO SPECIAL is not highlighting blank cells - HELP, I'm totally stuck. | Excel Discussion (Misc queries) |