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". Usedimension^hierarchyfor an alternate hierarchy orConnectionName::dimensionNamefor 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 is0. Use a higher value if the lookup depends on another formula.
Options
| Flag | What it does |
|---|---|
S | Write the results as static values. |
N | Return the principal element name when the attribute is empty or missing. |
Q | Return blank values for invalid elements and suppress the corresponding warnings. |
X | Skip 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)
See the ATTR examples in Google Sheets. To build the list of elements first, use SUBSET().
