The goal is to run 'MacroX' if cell equals Y. Is that even possible?
The goal is to run 'MacroX' if cell equals Y. Is that even possible?
"Nikki" <[email protected]> wrote in message
news:[email protected]...
> The goal is to run 'MacroX' if cell equals Y. Is that even possible?
HI Nikki,
Add the following code the to Worksheet_Change() event on the worksheet
where the cell is located.
hth, Rick
Private Sub Worksheet_Change(ByVal Target as Range)
If Target.address = "$C$4" and Target.Value = "Y" Then ' <<
Change cell address
Call MacroX
End If
End Sub
"Nikki" <[email protected]> wrote in message
news:[email protected]...
> The goal is to run 'MacroX' if cell equals Y. Is that even possible
Hi, yes it is possible. Place this in the sheet module for the
worksheet you want to check for 'Y' value:
Private Sub Worksheet_Change(ByVal Target as Range)
'Test to see if change ocurred in Cell 'B2'
If Target.address(0,0) <> "B2" Then exit sub
'Test if Cell B2 = "Y"
If Target.value = "Y" Then Call MacroX
End Sub
HTH-Lonnie M.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks