Excel Functions and Macros

R

Rich

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!
 
J

Jerry W. Lewis

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
 
J

JR

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.
 
Top