Run Macro From Within an =IF statement

J

job1job1

Is there a command that I can use within an =IF( statement to run
macro?

For example:

=IF(C2="Y",run=macroname,"N")

Thanks
 
H

Harlan Grove

Is there a command that I can use within an =IF( statement to run a
macro?
...

No. Closest you can get is Calculate and SheetCalculate event handlers.
 
M

Marcotte A

Frank
If you changed the macro from a Sub to a Function wouldn't it work (without it being an event procedure)?
 
F

Frank Kabel

Hi
depends on what this macro should do. If it should only return a value,
no problem but if it should change formats or other cells, no chance!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top