REFERENCE
U.VLOOKUP
Summary
Looks up specified values in another specified range of data (Descriptions use "column" and "row" consistent with the vertical flavor of the function; flip these terms to describe the horizontal flavor)
Syntax
=U.VLOOKUP(lookup_values, data_range, [lookup_columns], [return_columns], [drop_labels], [row_matches_once], [all_matches], [fail_values])
Parameters
| Parameter | Required | Description |
|---|---|---|
lookup_values |
Yes | The column or columns of values to be looked up in the data range. If "types" provided and no other params set, then a report of available lookup types is returned |
data_range |
Yes | The data on which the lookup will be performed. If only a valid topic is provided, the first page of that report will be used unless there is a spaced pipe and page indicator following the topic (e.g. |
[lookup_columns] |
No | Indicates the columns in the data range in which to search for specified lookup values. If not set then leftmost columns are used as lookup columns |
[return_columns] |
No | Indicates the columns from the data range to be returned in the result. Columns are returned in the order specified in this parameter. If TRUE then all columns returned; if FALSE then a vector with the indexes of matches is returned; If not set then all non-lookup columns are returned in their original order |
[drop_labels] |
No | If set to TRUE and the data range contains columns labels, then the column labels will be dropped from the result |
[row_matches_once] |
No | If set to TRUE then a given row in the data range will only be matched against a single row in lookup values. By default identical lookup values can match with the same data row |
[all_matches] |
No | If set to TRUE then all rows in the data range that match a row of lookup values are returned. By default lookup values match with only the first matching data row. Include "above(n)" and/or "below(n)" to have n rows above and/or below the match included in the result |
[fail_values] |
No | If set then specified value will be returned for failed lookups. Can be a single value to always return...or a vector of values and the corresponding fail value will be returned when a row fails to match. By default an #N/A error is returned for failed lookups |
Behavior
The documented public interface is supported by the current U Add-in source signature and the maintained Usage Examples workbook. Optional parameters are shown in square brackets in the syntax above; omit the brackets when entering a formula.
Return Value
Returns the function result or action status described by the formula and parameters above. The maintained sources do not define a narrower, stable return contract for this function.
Examples
Notes
- Formula examples are preserved from maintained workbook usage and normalized to the current
U.prefix. - Complete formulas demonstrate working patterns; they do not imply that undocumented option values are supported.
- Where maintained sources do not specify every accepted value, default, or error message, this page does not infer one.
- For functions that perform actions, use a visible trigger or supported block/throttle parameter to avoid unintended repetition during recalculation.
Related
- Concept: Grids, Tables, and Array Shaping
- Concept: Dynamic Ranges and Spill Results
- How-to: Build a Pivot-Style Grid
- Example: Live Pivot-Style Grid