Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 90
Default how can i run a macro from a formula

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 130
Default how can i run a macro from a formula

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

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,939
Default how can i run a macro from a formula

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
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Formula or Macro Eán[_2_] Excel Worksheet Functions 1 May 5th 09 12:21 PM
Formula in macro causes macro to fail KCK Excel Programming 2 February 8th 07 08:47 PM
Formula expected end of statement error, typing formula into cell as part of VBA macro [email protected] Excel Programming 1 July 20th 06 07:58 PM
formula to a macro help PLEASE Hemming Excel Discussion (Misc queries) 2 March 9th 06 03:16 PM
Macro Formula Corey Excel Discussion (Misc queries) 1 February 4th 06 06:13 PM


All times are GMT +1. The time now is 04:23 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"