LOOKUP

Returns a row offset a given number of rows from the current row

LOOKUP( column, integer)

Returns a reference to a row relative to the current row, determined by the input integer. If integer is 0, returns the current row.

OFFSET() and LOOKUP() are aliases of one another.

Arguments

Argument

Description

column

Column to return

integer

Number of rows to offset. integer can be positive or negative.

Output

Values in column, offset by the given integer

Example

Let's say we want to find yesterday's price such that we can compare today's price and yesterday's price directly. LOOKUP({Price}, -1) allows us to obtain the price from 1 row behind our current row.

Last updated