View Full Version : Solved: Worksheet Change?
Blackie50
03-12-2012, 05:33 AM
Hi,
 
Am wanting to automatically change the values in column I based on the input in column E. 
E.g If I type UNKNOWNC in E7 then value in I7 changes to RES
 
Please could someone help with the code
 
thanks
Jon
Bob Phillips
03-12-2012, 06:12 AM
Private Sub Worksheet_Change(ByVal Target As Range)
    On Err GoTo ws_exit
    
    Application.EnableEvents = False
    
    If Target.Address = "$E$7" Then
    
        If Target.Value = "UNKNOWN" Then
        
            Me.Range("I7").Value = "RES"
        End If
    End If
ws_exit:
    Application.EnableEvents = True
End Sub
Kenneth Hobs
03-12-2012, 06:15 AM
Right click the sheet tab, View Code, and paste:
Private Sub Worksheet_Change(ByVal Target As Range)
  If Target.Column <> 5 Then Exit Sub
  Application.EnableEvents = False
  If Target.Value2 = "UNKNOWNC" Then Range("I" & Target.Row).Value2 = "RES"
  Application.EnableEvents = True
End Sub
Blackie50
03-12-2012, 07:08 AM
Thanks guys - works fine
 
regards
Powered by vBulletin® Version 4.2.5 Copyright © 2025 vBulletin Solutions Inc. All rights reserved.