Skip to content

ATTR() ​

Use ATTR() to look up an attribute for elements you already have in your sheet. For example, you can look up a product caption or color from a list of product codes.

Syntax ​

text
=ATTR(dimensionName, elements, attributeName, options, solveOrder)
  • dimensionName — The dimension, such as "Product". Use dimension^hierarchy for an alternate hierarchy or ConnectionName::dimensionName for another connection.
  • elements — An element name, a single cell, or a horizontal or vertical range of element names. TeamOne ignores blank cells in the range.
  • attributeName — The attribute to return, such as "Caption_Default".
  • options — Output flags, such as "NQ".
  • solveOrder — The recalculation order. The default is 0. Use a higher value if the lookup depends on another formula.

Options ​

FlagWhat it does
SWrite the results as static values.
NReturn the principal element name when the attribute is empty or missing.
QReturn blank values for invalid elements and suppress the corresponding warnings.
XSkip the formula when TeamOne recalculates the sheet.

Examples ​

Look up captions for products listed in B6:B27. Use the product code as a fallback when a caption is missing.

text
=ATTR("Product", B6:B27, "Caption_Default", "N")

You can omit the options and put a numeric solve order in their place. This example runs the lookup at solve order 2.

text
=ATTR("Product", "21002", "Product Color", 2)

ATTR formula looking up product captions in Google Sheets

See the ATTR examples in Google Sheets. To build the list of elements first, use SUBSET().