View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Gary''s Student Gary''s Student is offline
external usenet poster
 
Posts: 11,058
Default Change Cell contents

Yes, with a change event macro. This is for cell B9, but can be modified for
any range:

Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Range("B9"), Target) Is Nothing Then Exit Sub
s = "Ignition off"
v = Target.Value
If InStr(1, v, s) = 0 Then Exit Sub
Application.EnableEvents = False
Target.Value = s
Application.EnableEvents = True
End Sub

Paste this in the worksheet code area, NOT a standard module.
--
Gary''s Student - gsnu200746


"Hassan" wrote:

Hi All,

Is it possible to change the cell value when there is any word exist in that
cell?
e.g.

GPS; Ignition off
TM; Ignition off
ST; Ignition off
Ignition off

when there is Ignition off with anyother word the cell value change to
Ignition off.

Thanks & Regards

Hassan