#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 271
Default ChangeEvent


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
  #2   Report Post  
Posted to microsoft.public.excel.programming
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

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



All times are GMT +1. The time now is 12:47 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"