Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Const WS_RANGE As String = "B:B"
If Not Intersect(Target, rang(WS_RANGE)) Is Nothing Then
If Target.Value = "Open" Then
Target.EntireRow.Interior.ColorIndex = 38
Else
Target.EntireRow.Interior.ColorIndex = xlColorIndexNone
End If
End If
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
(replace xxxx in the email address with gmail if mailing direct)
> Hello all
> I would like to hightlight a row based on a value in a cell. I know it is
[quoted text clipped - 4 lines]
>
> Thanks
Anift - 11 Nov 2006 04:17 GMT
Hello Bob,
Thanks for the response, i really appreciate..
But there is something wrong in this code
I am getting error on line " If Not Intersect(Target, rang(WS_RANGE)) Is
Nothing Then"
Its highlighing the word "rang",
Can we do anything about it?
any help will be appreciated.
Thanks
> Private Sub Worksheet_SelectionChange(ByVal Target As Range)
> Const WS_RANGE As String = "B:B"
[quoted text clipped - 31 lines]
> >
> > Thanks
Bob Phillips - 11 Nov 2006 09:52 GMT
Sorry, missed an e
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Const WS_RANGE As String = "B:B"
If Not Intersect(Target, Range(WS_RANGE)) Is Nothing Then
If Target.Cells.Count = 1 Then
If Target.Value = "Open" Then
Target.EntireRow.Interior.ColorIndex = 38
Else
Target.EntireRow.Interior.ColorIndex = xlColorIndexNone
End If
End If
End If
End Sub

Signature
HTH
Bob Phillips
(replace somewhere in email address with gmail if mailing direct)
> Hello Bob,
> Thanks for the response, i really appreciate..
[quoted text clipped - 44 lines]
> > >
> > > Thanks
Anift - 12 Nov 2006 05:08 GMT
Thanks bob, I figured it out..
thanks a lot, it helped
Kudos to u
> Sorry, missed an e
>
[quoted text clipped - 63 lines]
> > > >
> > > > Thanks