Thread: ChangeEvent
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Jim Thomlinson[_5_] Jim Thomlinson[_5_] is offline
external usenet poster
 
Posts: 486
Default ChangeEvent

It would probably be easiest to use a formula but here it is with Change code

Private Sub Worksheet_Change(ByVal Target As Range)

If Not (Intersect(Target, Range("A1:A10")) Is Nothing) Then
If UCase(Trim(Target.Value)) = "YES" Then Target.Offset(0, 1).Value
= "Red"
End If
End Sub
--
HTH...

Jim Thomlinson


"Shawn" wrote:


Here is what I want. If a person types "yes" in any of cells A1:A10 then I
want the adjacent cell to the right to change to the value "red".

For example, if they type yes in cell A3 then cell B3 would automatically
change to the value "red".


--
Thanks
Shawn