Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
In a general module
Public Function Macro1() set rng = Application.Caller Macro1 = rng.Address End Function Public Function Macro2() set rng = Application.Caller Macro2 = rng.Parent.Name End Function Note that a function used in a worksheet can only return a value to the cell in which it is contained. It can't do formatting or otherwise change the Excel environment. -- Regards, Tom Ogilvy "fred" wrote in message ... does anyone know how to use a macro within an IF statement? for example: If(A2=10,Macro1,Macro2) |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
IF Statement in a macro: | Excel Discussion (Misc queries) | |||
If Statement to run a macro | Excel Discussion (Misc queries) | |||
If statement in macro | Excel Discussion (Misc queries) | |||
If statement in a Macro | Excel Discussion (Misc queries) | |||
Macro and If Statement | Excel Discussion (Misc queries) |