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

The arraytablefloor( 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 between rows in the table.

subsep – The secondary separator character 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 lower 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.

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

See Also


History

VersionStatusNotes
10.0No ChangeCarried over from Panorama 6.0