The Lookup function is an interesting function and can help us analyze
data in interesting ways. As you'll see later it becomes very powerful
in conjuction with functions like index
and match.
The function has two syntax variations
- Vector form: Here it looks in a one-column
(or
one-row) for a value and returns a value from a second one-column (or
one-row) range from the same position. This one-column or one-row range
is also called a 'vector'. The data in the lookup-vector
must be sorted in ascending
order.
- Array form: Here it looks in the first row or column
of an
array for a specific value and returns a value in the last
row or
column of the array from the same position. It is mandatory
to sortthe
data in ascending order in the first column or row.
For
convenience you can name the array 'mydata'
The synatx for both the variations is also shown in the training video.
|