Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2
Default Run a Macro inside a formula

I would like to know if it possible to run a marco inside a formula. I am
looking to put a formula together that uses a "If" statement, that if true it
would run a marco?

Thanks
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,058
Default Run a Macro inside a formula

You can use a worksheet event macro to run when the result of a cell's
calculation meets a criteria. See:


http://www.mvps.org/dmcritchie/excel/event.htm

--
Gary''s Student - gsnu200791


"crash20001" wrote:

I would like to know if it possible to run a marco inside a formula. I am
looking to put a formula together that uses a "If" statement, that if true it
would run a marco?

Thanks

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 449
Default Run a Macro inside a formula

Formulas can not run macros, it's a limitation by design. You might instead
have a look at the worksheet_change event macros in the sheet module or
thisworkbook module, they run on cell entries.

HTH. Best wishes Harald

"crash20001" wrote in message
...
I would like to know if it possible to run a marco inside a formula. I am
looking to put a formula together that uses a "If" statement, that if true
it
would run a marco?

Thanks


  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2
Default Run a Macro inside a formula

I am having issues with the event marco location. Is it in the VB code or in
Excel?

"Harald Staff" wrote:

Formulas can not run macros, it's a limitation by design. You might instead
have a look at the worksheet_change event macros in the sheet module or
thisworkbook module, they run on cell entries.

HTH. Best wishes Harald

"crash20001" wrote in message
...
I would like to know if it possible to run a marco inside a formula. I am
looking to put a formula together that uses a "If" statement, that if true
it
would run a marco?

Thanks



  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,071
Default Run a Macro inside a formula

It is VBA code and all VBA code is a part of the file in which it resides.
HTH Otto
"crash20001" wrote in message
...
I am having issues with the event marco location. Is it in the VB code or
in
Excel?

"Harald Staff" wrote:

Formulas can not run macros, it's a limitation by design. You might
instead
have a look at the worksheet_change event macros in the sheet module or
thisworkbook module, they run on cell entries.

HTH. Best wishes Harald

"crash20001" wrote in message
...
I would like to know if it possible to run a marco inside a formula. I
am
looking to put a formula together that uses a "If" statement, that if
true
it
would run a marco?

Thanks







  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 449
Default Run a Macro inside a formula

Rightclick the sheet tab, "view code", and you should be able to create it
with the two dropdowns just above the big white module area.

And then ThisWorkbook is found in the project explorer to the left.

Best wishes Harald


"crash20001" wrote in message
...
I am having issues with the event marco location. Is it in the VB code or
in
Excel?

"Harald Staff" wrote:

Formulas can not run macros, it's a limitation by design. You might
instead
have a look at the worksheet_change event macros in the sheet module or
thisworkbook module, they run on cell entries.

HTH. Best wishes Harald

"crash20001" wrote in message
...
I would like to know if it possible to run a marco inside a formula. I
am
looking to put a formula together that uses a "If" statement, that if
true
it
would run a marco?

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
How do I run a macro from inside an"=IF" formula in Excel 2003? Drawn83 Excel Worksheet Functions 1 June 4th 07 08:38 PM
Event Macro running another macro inside K1KKKA Excel Discussion (Misc queries) 1 December 20th 06 08:21 PM
using a cell value to control a counter inside a macro and displaying macro value ocset Excel Worksheet Functions 1 September 10th 06 05:32 AM
Macro Inside Cell dah Excel Discussion (Misc queries) 3 January 23rd 06 09:08 PM
Need macro to insert text string while inside cell (formula) BrianB Excel Discussion (Misc queries) 0 May 31st 05 03:18 PM


All times are GMT +1. The time now is 01:40 AM.

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"