Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macros - call or launch from fromula
can I launch or call a macro from an @IF() statement in a
cell? If so, what is the propoer synatax. Thanks B. Paul Welch San Diego |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macros - call or launch from fromula
No, you can't launch a macro as the result of an IF statement. However, take
a look at worksheet events - these are probably what you need. -- Regards Andy Wiggins www.BygSoftware.com Home of "The Excel Auditor" and "Byg Tools for VBA" "Paul" wrote in message ... can I launch or call a macro from an @IF() statement in a cell? If so, what is the propoer synatax. Thanks B. Paul Welch San Diego |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macros - call or launch from fromula
Paul; you can create a user-defined function (UDF) which is callable from
within your =IF function.... For example, if you'd like to create an IF function that checks if the text color in a particular cell is red, you could write something like this: Function CheckColor(CellRef As String) Dim CC As Long On Error GoTo ERR1 CC = Range(CellRef).Font.Color CheckColor = CC GoTo DONE ERR1: CheckColor = "#N/A" DONE: End Function .... and then in your =IF function, write something like this: =IF(CheckColor(CELL("address",A32))=255,"yes it's red","something other than red") Hope this gives you some ideas. HWH "Paul" wrote in message ... can I launch or call a macro from an @IF() statement in a cell? If so, what is the propoer synatax. Thanks B. Paul Welch San Diego |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
macro to call other macros | Excel Worksheet Functions | |||
fromula bar | Excel Discussion (Misc queries) | |||
Fromula | Excel Discussion (Misc queries) | |||
Call Center Management: How to calculate 'cost per call' | Excel Discussion (Misc queries) | |||
Need a fromula | Excel Discussion (Misc queries) |