Run macro based on range value

  • Thread starter saman110 via OfficeKB.com
  • Start date
S

saman110 via OfficeKB.com

How can I create a macro that whenever I type "y" or "Y" in "O" column, it
run a macro.

thx.
 
J

Jim Thomlinson

This code is worksheet event code so it must be posted into the sheet. Right
click the approporate tab and select View Code. Paste the following...

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column = 15 And UCase(Target.Value) = "Y" Then
MsgBox "Run your macro"
End If
End Sub
 
Top