Most Valuable Professional

View Jan Karel Pieterse's profile on LinkedIn subscribe to rss feed
Subscribe in a reader

Subscribe to our mailing list

* indicates required

Audit !!!

Check out our RefTreeAnalyser
the ultimate Excel formula auditing tool.


Excel VBA Masterclass (English)
Excel VBA for Financials (Dutch)

Third party tools

Speed up your file

The best tool to optimise your Excel model!

What has changed?

PerfectXL Compare, for Spreadsheet Comparison
This Excel compare tool is fast, reliable, and easy to use. Compare two Excel files now and see for yourself!
Home > English site > Articles > Defined Names > Arguments
Deze pagina in het Nederlands

Range Names In Excel

Passing an argument to a named formula

As shown in the file (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:

IsFormula =GET.CELL(48,INDIRECT(myref)))+0*now()

CellColor =get.cell(63,indirect(MyRef))+0*now()

RowIsHidden =IF(GET.CELL(17,INDIRECT(Myref))=0,TRUE,FALSE)+0*now()

RowHeight =GET.CELL(17,INDIRECT(Myref))+0*NOW()

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