how can i run a macro from a formula

G

Guest

i CREATED A VERY SIMPLE MACRO TO DELETE ROWS, BUT I WANT TO CALL IT WHEN
CERTAIN CONDITIONS ARE TRUE, IT IS POSSIBLE CALL A MACRO FROM A FORMULA? I
THINK THAT IN LOTUS 123 THERE IS A COMMAND TO EXECUTE A MACRO SO SHOULD BE
ONE IN EXCEL.

THANKS
 
G

Guest

Fred,

Try this =<Function Name>(D10,">=1000")
Make your macro a function and place it in the formula in place of the
<Function Name>.
 
G

Guest

What JRForm is talking about is a user defiend function (or UDF) which can
only return a value to the cell that it is in. It can not delete other cells
or rows or change formating or... It can ONLY return a value. So I don't
think that is going to work out for you. A better option would probably be
event programming. After the user has enetered a value (the event) code will
automatically be executed to check the conditions and take the appropriate
actions. Here is a link to get you started...

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

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