View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Mr.Param[_2_] Mr.Param[_2_] is offline
external usenet poster
 
Posts: 2
Default 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