Skip to main content
You are viewing help content for pre-release software. This document and the features it describes are subject to change.
All docs
V26.2
  • Lookup and Reference Functions in Formulas

    • 4 minutes to read

    This document describes lookup and reference functions supported by DevExpress Spreadsheet Document API.

    Name

    Description

    Syntax

    ADDRESS

    Returns a text reference to a worksheet cell.

    ADDRESS(row_num, column_num, [abs_num], [a1], [sheet_text])

    AREAS

    Returns the number of areas in a reference. An area is a contiguous cell range or a single cell.

    AREAS(reference)

    CHOOSE

    Selects a value from a list based on an index number.

    CHOOSE(index_num, value1, [value2], …)

    COLUMN

    Returns the column number of the specified cell reference, or the number of the current column if you omit the reference.

    COLUMN([reference])

    COLUMNS

    Returns the number of columns in an array or reference.

    COLUMNS(array)

    FILTER

    Filters a range or array based on criteria you define.

    FILTER(array, include, [if_empty])

    FORMULATEXT

    Returns a formula as a string.

    FORMULATEXT(reference)

    GETPIVOTDATA

    Returns data from a PivotTable report.

    GETPIVOTDATA(data_field, pivot_table, [field1, item1, field2, item2], …)

    HLOOKUP

    Searches for a value in the first table row and returns a value in the same column from the specified row.

    HLOOKUP(lookup_value, table_array, row_index_num, [range_lookup])

    HYPERLINK

    Creates a hyperlink.

    HYPERLINK(link_location,friendly_name)

    INDEX

    Selects a value from a reference or array based on row and column indexes.

    INDEX(array, row_num, [column_num])
    INDEX(reference, row_num, [column_num], [area_num])

    INDIRECT

    Returns a reference specified by a text value.

    INDIRECT(ref_text, [a1])

    LOOKUP

    Looks in a one-row or one-column range for a value and returns a value from the same position in a second one-row or one-column range.

    Vector form: LOOKUP(lookup_value, lookup_vector, [result_vector])

    ‘lookup_value’ is the value to look up in the ‘lookup_vector’ single-column or single-row range. ‘lookup_vector’ is a list of data (a single-column or single-row range) where the function searches for ‘lookup_value’. ‘result_vector’ is a range of the same size as ‘lookup_vector’. The function returns the ‘result_vector’ value at the position of the match in ‘lookup_vector’.

    Array form: LOOKUP(lookup_value, array)

    ‘lookup_value’ is the value to look up in the specified array. ‘array’ is a two-dimensional array of data. The function searches for ‘lookup_value’ in the first column (or row) of the array and returns the value from the corresponding position in the last column (or row).

    MATCH

    Searches for a specified item in a cell range and returns the relative position of that item in the range.

    MATCH(lookup_value, lookup_array, [match_type])

    OFFSET

    Returns a reference to a range that is a specified number of rows and columns from a cell or cell range.

    OFFSET(reference, rows, cols, [height], [width])

    ROW

    Returns the row number of the specified cell reference, or the number of the current row if you omit the reference.

    ROW([reference])

    ROWS

    Returns the number of rows in a reference or array.

    ROWS(array)

    SINGLE

    Reduces multiple values to a single value as follows:

    • If the ‘value’ parameter is a single item, the function returns this item.

    • If the ‘value’ parameter is a range, the function returns the value from the cell in the same row or column as the formula.

    • If the ‘value’ parameter is an array, the function returns the top-left value.

    Excel introduced the SINGLE function with dynamic arrays and later replaced it with the @ operator.

    SINGLE(value)

    SORT

    Sorts the contents of a range or array.

    SORT(array, [sort_index], [sort_order], [by_col]) |

    TRANSPOSE

    Returns a vertical range of cells as a horizontal range, or vice versa.

    TRANSPOSE(array)

    UNIQUE

    Returns a list of unique values in a range or array.

    UNIQUE(array, [by_col], [exactly_once])

    VLOOKUP

    Looks up a value in the first column of a table and returns a value in the same row from a column that you specify.

    VLOOKUP( lookup_value, table_array, col_index_num, [range_lookup] )

    XLOOKUP

    Searches a range or an array and returns the item that corresponds to the first match. If no match exists, XLOOKUP can return the closest (approximate) match.

    XLOOKUP(lookup_value, lookup_array, return_array, [if_not_found], [match_mode], [search_mode])

    XMATCH

    Returns the relative position of an item in an array or range of cells. The XMATCH function supports exact matches, approximate matches, and wildcards (* ? ~) for partial matches.

    XMATCH(lookup_value, lookup_array, [match_mode], [search_mode])