ID EN
#Lookup and reference

FIELDVALUE

Excel Functions

Extract field value from a data type

Syntax

EXCEL
=FIELDVALUE(value, field_name)

Arguments

Parameter Description
value The data type with field values.
field_name The field name provided as a text value.

Return Value

Field value for given data type

Details

The Excel FIELDVALUE function extracts a given field value from a Data Type. The field is specified by name and provided as a text value. Use the FIELDVALUE function to retrieve a field value by name from linked data types like Stocks, Geography, Food, Currency, and more. To retrieve a field value from a linked data type, provide the field name as text in double quotes (""). For example, with a city in cell A1, linked to a Geography data type, you can request population data like this: In the example shown, the formula in cell C5, copied down, is: The result is population data for the 12 cities listed in B5 to B16. The FIELDVALUE function is an alternative the "dot" syntax for retrieving a field value from a data type. The two formulas below return the same result:

Examples

Examples

To retrieve a field value from a linked data type, provide the field name as text in double quotes (""). For example, with a city in cell A1, linked t

EXCEL
=FIELDVALUE(A1,"city population")
Examples

In the example shown, the formula in cell C5, copied down, is:

EXCEL
=FIELDVALUE(B5,"city population")
Alternative syntax

The FIELDVALUE function is an alternative the "dot" syntax for retrieving a field value from a data type. The two formulas below return the same resul

EXCEL
=FIELDVALUE(B5,"area")
=B5.area
Alternative syntax

Note square brackets ([]) are required for field names that contain spaces:

EXCEL
=FIELDVALUE(B5,"city population")
=B5.[city population]
Trapping errors

In column D of the example, FIELDVALUE is used to extract "Area" like this:

EXCEL
FIELDVALUE(B5,"area")
Trapping errors

This returns a #FIELD! error for cities where area is not available. To trap this error and return an empty string ("") where there are errors, the IF

EXCEL
=IFERROR(FIELDVALUE(B5,"area"),"")