PC Review


Reply
Thread Tools Rate Thread

how can i run a macro from a formula

 
 
=?Utf-8?B?RlJFRA==?=
Guest
Posts: n/a
 
      2nd Oct 2007
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
 
Reply With Quote
 
 
 
 
=?Utf-8?B?SlJGb3Jt?=
Guest
Posts: n/a
 
      2nd Oct 2007
Fred,

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

"FRED" wrote:

> 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

 
Reply With Quote
 
=?Utf-8?B?SmltIFRob21saW5zb24=?=
Guest
Posts: n/a
 
      2nd Oct 2007
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
--
HTH...

Jim Thomlinson


"JRForm" wrote:

> Fred,
>
> Try this =<Function Name>(D10,">=1000")
> Make your macro a function and place it in the formula in place of the
> <Function Name>.
>
> "FRED" wrote:
>
> > 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

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
store formula in macro then paste it when macro runs Nina Microsoft Excel Programming 2 16th Dec 2009 07:21 PM
formula or macro to change a formula in muliple spreadsheets mel.pilgrim@agr.gc.ca Microsoft Excel Programming 1 21st May 2009 05:27 PM
use macro to copy formula with value and not formula without value ramzi Microsoft Excel Programming 3 4th Aug 2008 02:07 PM
Formula in macro causes macro to fail =?Utf-8?B?S0NL?= Microsoft Excel Programming 2 8th Feb 2007 08:47 PM
Formula expected end of statement error, typing formula into cell as part of VBA macro DavidGMullins@gmail.com Microsoft Excel Programming 1 20th Jul 2006 07:58 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 03:02 AM.