Passing an argument to a named formula
As shown in the file Arg2Name.zip (see the download page), there is a trick to pass arguments to a defined name formula.
First the named formula called Myref (see below) has to be created, which evaluates the string of the formula of the "active" cell (the cell that calls one of the other named formulas in this example) and extracts an address out of that. In order to use these formulas, a trick is involved. The function that contains the address should look like this:
The Myref function finds the "Row(" part in the string of the formula and takes all text between that and the first closing paren to be a valid cell reference. Myref in part is used as an argument to the other functions.
Define Myref as:
Note, that Myref has used the GetRC name demonstrated here.
Here are some examples that may be used in combination with the Myref named formula. Define these names:
An example how to use these functions in worksheet cells:
Shows the colournumber of the background of cell D3.
Shows the rowheight of cell D3 (in effect of row D).