Home |
Search |
Today's Posts |
|
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
row and cell highlighted
Hi,
currently I am using this command: Private Sub Worksheet_SelectionChange(ByVal Target As Range) Cells.Interior.ColorIndex = xlColorIndexNone Target.EntireRow.Interior.ColorIndex = 36 End Sub I would like to: 1. highlight only certain range e.g A2:AK81 2. highlighted cell change with different color 3. keep my shading color TQ |
#2
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
row and cell highlighted
Hi Mr.Param
Modified to suit your requirement. Try and feedback. You can try out different color to suit your requirement. Private Sub Worksheet_SelectionChange(ByVal Target As Range) If Not Application.Intersect(Target, _ Range("A2:AK81")) Is Nothing Then Range("A2:AK81").Interior.ColorIndex = -4142 Range("A" & Target.Row & ":AK" & _ Target.Row).Interior.ColorIndex = 35 Target.Cells.Interior.ColorIndex = 6 End If End Sub If this post helps click Yes --------------- Jacob Skaria "Mr.Param" wrote: Hi, currently I am using this command: Private Sub Worksheet_SelectionChange(ByVal Target As Range) Cells.Interior.ColorIndex = xlColorIndexNone Target.EntireRow.Interior.ColorIndex = 36 End Sub I would like to: 1. highlight only certain range e.g A2:AK81 2. highlighted cell change with different color 3. keep my shading color TQ |
#3
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
row and cell highlighted
Yes, it works. Thanks lot.
"Jacob Skaria" wrote: Hi Mr.Param Modified to suit your requirement. Try and feedback. You can try out different color to suit your requirement. Private Sub Worksheet_SelectionChange(ByVal Target As Range) If Not Application.Intersect(Target, _ Range("A2:AK81")) Is Nothing Then Range("A2:AK81").Interior.ColorIndex = -4142 Range("A" & Target.Row & ":AK" & _ Target.Row).Interior.ColorIndex = 35 Target.Cells.Interior.ColorIndex = 6 End If End Sub If this post helps click Yes --------------- Jacob Skaria "Mr.Param" wrote: Hi, currently I am using this command: Private Sub Worksheet_SelectionChange(ByVal Target As Range) Cells.Interior.ColorIndex = xlColorIndexNone Target.EntireRow.Interior.ColorIndex = 36 End Sub I would like to: 1. highlight only certain range e.g A2:AK81 2. highlighted cell change with different color 3. keep my shading color TQ |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Highlighted cell | New Users to Excel | |||
highlighted cell color | Setting up and Configuration of Excel | |||
Every cell is highlighted | Excel Discussion (Misc queries) | |||
Highlighted Cell | Excel Discussion (Misc queries) | |||
Highlighted Cell | Excel Discussion (Misc queries) |