View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Bob Phillips Bob Phillips is offline
external usenet poster
 
Posts: 10,593
Default Placing macros within the IF condition

You cannot run a macro in an IF Function if that macro tries to modify the
sheet or cells in any way. If it is a function that returns a result then
that is okay, simply

=IF(A1=1,Function1, IF(A2=2,Function2, etc.

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"Sonia" wrote in message
...
Hi...

I would like to run the below condition in excel.

If value of column A=1 then run macro A
If value of column A=2 then run macro B
If value of column A=3 then run macro C

Please help..

Bye for now
Sonia