ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Excel Functions and Macros (https://www.excelbanter.com/excel-discussion-misc-queries/61564-excel-functions-macros.html)

Rich

Excel Functions and Macros
 
hello.

is it possible to input a function into excel where if a cell does/doesnt
meet a certain critera then excel automatically executes a macro?

e.g. if A20 equals 22-12-05 then excel will run macro Date1.

thank you for any assistance and merry christmas!
--
- Rich

Jerry W. Lewis

Excel Functions and Macros
 
A function called from a worksheet cell can only return a value (to that
cell) neither it, nor any macros called by it can alter the Excel
environment in any way (change format, change values in other cells, etc).

Assuming that you want to execute a "macro" for one of these forbidden
purposes, you would have to the Worksheet_Change event.

Jerry

Rich wrote:

hello.

is it possible to input a function into excel where if a cell does/doesnt
meet a certain critera then excel automatically executes a macro?

e.g. if A20 equals 22-12-05 then excel will run macro Date1.

thank you for any assistance and merry christmas!



JR

Excel Functions and Macros
 
Rich, can you expound a little on exactly what you are tying to do? It is
probably possible to this with just a worksheet function and not a macro.

"Rich" wrote:

hello.

is it possible to input a function into excel where if a cell does/doesnt
meet a certain critera then excel automatically executes a macro?

e.g. if A20 equals 22-12-05 then excel will run macro Date1.

thank you for any assistance and merry christmas!
--
- Rich



All times are GMT +1. The time now is 09:37 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com