GET.DEF macro

Returns the name, as text, that is defined for a particular area, value, or formula in a workbook. Use GET.DEF to get the name corresponding to a definition. To get the definition of a name, use GET.NAME.

Syntax

GET.DEF(def_text, document_text, type_num)

Def_text    can be anything you can define a name to refer to, including a reference, a value, an object, or a formula.

Document_text    specifies the sheet or macro sheet that def_text is on. If document_text is omitted, it is assumed to be the active macro sheet.

Type_num    is a number from 1 to 3 specifying which types of names are returned.

Type_num Returns
1 or omitted Normal names only
2 Hidden names only
3 All names

Examples

If the specified range in Sheet4 is named Sales, the following macro formula returns "Sales":

GET.DEF("R2C2:R9C6", "Sheet4")

If the value 100 in Sheet4 is defined as Constant, the following macro formula returns "Constant":

GET.DEF("100", "Sheet4")

If the specified formula in Sheet4 is named SumTotal, the following macro formula returns "SumTotal":

GET.DEF("SUM(R1C1:R10C1)", "Sheet4")

If 3 is defined as the hidden name Counter on the active macro sheet, the following macro formula returns "Counter":

GET.DEF("3", , 2)

Related Functions

GET.CELL   Returns information about the specified cell

GET.NAME   Returns the definition of a name

GET.NOTE   Returns characters from a note

NAMES   Returns the names defined on a workbook

Return to index