-
Notifications
You must be signed in to change notification settings - Fork 2
Commands
lhem edited this page Apr 5, 2020
·
2 revisions
In addition to cells, formulas may be entered as inputs to a number of dialogs. The following table lists some of the dialogs that support variable type inputs:
| Dialog | Type | Option |
|---|---|---|
| Conditional format | boolean | formula rule |
| Data validation | boolean/reference | custom/list |
| Hyperlink | reference | subaddress |
| Chart series | array | named formula |
| Goto | reference | formula (rc/a1) |
| Macros | any | vba argument |
For example highlighting the cell formula XLOOKUP(D1,A:A,B:B) and choosing the Goto command followed by enter resolves the formula as a cell reference, clicking Undo restores the original formula. And the same formula can be entered as a hyperlink address #XLOOKUP(D1,A:A,B:B).
To run a macro from a formula hyperlink, set the hyperlink address to a udf that returns a reference to the target cell and runs a command such as #MyMacro(rc). The same udf could be run from the Macros dialog with a vba argument enclosed in single quotes 'Mymacro Activecell' and clicking Run.