• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Execute Macros From Formulas (Or Cell Value)

indi visual

New Member
I would like to execute macros if specific cells change.


I have 25 cells I would like to apply this to.


After hours upon hours of failure, I would really just like to know if this even possible.


If "Z1" equals "1", then run macro

If value is not "1" do nothing

If "Z2" equals "2", then run macro

If value is not "2" do nothing
 

kchiba

Active Member
Hi


You can create a macro that is inserted in the Worksheet that executes for Worksheet_Change and test for the value of Z1 and Z1 and run the appropriate code if they are equla to 1 or 2.


Cheers


kanti
 

kchiba

Active Member
Hi


Following on my earlier reply, refer to the article by Chi Pearson:


http://www.cpearson.com/excel/Events.aspx


Note, that if the numbers in the target celss, that is Z1, Z2 etc are changed by a formula and not by manual input it will not trigger a Worksheet Change event


Kanti
 
Top