arraytableceiling(
TABLE
,
THEKEY
,
MAINSEP
,
SUBSEP
,
DEFAULT
)

The arraytableceiling( function looks up a value in a double column table, similar to the table( function but from an array instead of a database.


Parameters

This function has five parameters:

table – The table containing the lookup data, which must be sorted in ascending order. The first column in the table is the key value, the second column is the data value. (Note: If the sub separator is “”, the first column is used as the data value also.)

thekey – The value to lookup in the table.

mainsep – The main separator character or characters between rows in the table.

subsep – The secondary separator character or characters between the first and second column in the table.

default – Value to return if no match is found.


Description

This function looks up a value in a double column table, similar to the table( function but from an array instead of a database. If there is no exact match this function will return the next higher value, if any. If the key value is numeric or contains all numbers, numeric comparisons (50 < 200) will be used instead of text comparisons (50 > 200). (Note: This function always returns a text value, even if the key is numeric.) If the key value is not within the array bounds, the default value will be returned.

arraytableceiling("0=ZERO,200=LOW,1000=MEDIUM,5000=HIGH",20,",","=","OUT OF RANGE") ☞ LOW
arraytableceiling("0=ZERO,200=LOW,1000=MEDIUM,5000=HIGH",4000,",","=","OUT OF RANGE") ☞ HIGH 

See Also


History

VersionStatusNotes
10.0UpdatedCarried over from Panorama 6.0 but more than one character is now allowed for use as the separator parameter