Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I'd like to run one of two different macros I have created based on a Yes or
No answer in a cell. I've tryed the following formula: =IF(K16="No", Macro "Closed", Macro "Not_Closed) I was just guessing at the command to run a macro from a cell, but was not correct. Any help? Thanks JIM |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
hi,
not even close. formulas return values, they cannot perform actions like call a macro. (also copy, paste, move, change color, phone home, ect) but you can write a macro to do this. put it in the worksheet change event. it might look something like this. Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range) If Range("B5").Value = "Y" Then Call Macro1 Else If Range("B5").Value = "N" Then call macro2 End If End If End Sub hope this gives you ideas. good luck regards FSt1 "Jim" wrote: I'd like to run one of two different macros I have created based on a Yes or No answer in a cell. I've tryed the following formula: =IF(K16="No", Macro "Closed", Macro "Not_Closed) I was just guessing at the command to run a macro from a cell, but was not correct. Any help? Thanks JIM |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
conditional formatting: problem entering EOMONTH formula... | Excel Discussion (Misc queries) | |||
Macro Formula | Excel Discussion (Misc queries) | |||
Formula Problem - interrupted by #VALUE! in other cells!? | Excel Worksheet Functions | |||
Closing File Error | Excel Discussion (Misc queries) | |||
Formula for current month minus one = Quarter number in a macro. | Excel Discussion (Misc queries) |