Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default 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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,520
Default 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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
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

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
Highlighted cell Reen[_2_] New Users to Excel 1 November 3rd 08 10:11 PM
highlighted cell color kdadman Setting up and Configuration of Excel 4 May 24th 07 06:38 PM
Every cell is highlighted 5hulses Excel Discussion (Misc queries) 5 May 1st 05 11:27 PM
Highlighted Cell Dave Excel Discussion (Misc queries) 0 May 1st 05 05:40 PM
Highlighted Cell Dave Excel Discussion (Misc queries) 1 May 1st 05 05:22 PM


All times are GMT +1. The time now is 12:18 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"