Table Lookup
Search for a value in a table (the "lookup value") and retrieve a corresponding value. You can choose to retrieve the following types of values:
-
The location of the lookup value (identified by its row and column numbers)
-
All the values in the lookup value's row
-
All the values in the lookup value's column
-
A single value from a specific column in the lookup value's row
-
A single value from a specific row in the lookup value's column
-
Enter the name of the variable in which the table is stored.
-
Enter the delimiters that separate each column and row.
-
Choose whether to look for:
-
A single value matching the lookup criteria specified in 4, 5 & 6
-
All values that match the lookup criteria specified in 4, 5 & 6
If you select option a (a single value) and more than one matching value is found, the multiple lookup values found error will be returned in the error variable and the output variable will be returned as empty.
-
Select the condition for finding the lookup value:
-
equals (with options to ignore letter case/use wildcards/allow close match)
-
contains (with option to ignore letter case/allow close match)
-
match regular expression (with option to ignore letter case)
-
is greater than
-
is greater than or equal to
-
is less than
-
is less than or equal to
-
begins with (with option to ignore letter case)
-
ends with (with option to ignore letter case)
-
is empty
-
is defined
-
-
Enter the lookup value.
-
Select whether to search for the lookup value in the entire table, in a specific column, or in a specific row; and
Provide the column/row number in which to search (where relevant).
-
Select the value to return and provide additional information as required (varies by the type of value to return).
-
Enter the name(s) of the variable(s) in which to return the value(s) retrieved.
-
Enter the name of the variable in which to return the values retrieved
-
Enter the name of the variable in which to return the values retrieved.
-
Select whether you want the wizard to return:
-
The value from the last column in the lookup value's row; or
-
The value from a specific column in the lookup value's row (and enter the column number)
-
-
Enter the name of the variable in which to return the value(s) retrieved.
-
Select whether you want the wizard to return:
-
The value from the last row in the lookup value's column; or
-
The value from a specific row in the lookup value's column (and enter the row number)
-
-
Enter the name of the variable in which to return the value(s) retrieved
-
Enter the name of the variable in which to return the values retrieved.
-
all values that match the lookup condition; and
-
the lookup condition is something other than
equals
-
find all matching values greater than $10,000; and
-
return the matching value itself
-
Instruct the wizard how to handle any errors encountered. Read more about error handling.
Address (column & row): The wizard will return the location of the lookup value. |
|
Entire row: The wizard will return all the values in the lookup value's row |
|
Entire column: The wizard will return all the values in the lookup value's column. |
|
A value from a specific column in the same row: NOTE: This should be the actual column number, NOT the column's position relative to the lookup value |
|
A value from a specific row in the same column: NOTE: This should be the actual row number, NOT the row's position relative to the lookup value |
|
The matching value itself: The wizard will return the matching value(s) that meet the lookup criteria. EXAMPLE: When would you use this option? Returning the matching value itself is useful when you want to retrieve: Say, for example, your table contains transaction data, and you want to find the amounts all transactions greater than $10,000. You could set this command to: |
When relevant, values retrieved will be separated using the row and column delimiters you specified in 2.