Home > Expression Operators > Array Operators > #GETTABVAL > Range vs Exact Matches

Range vs Exact Matches

For this discussion, consider these CSV files (in Excel):

Year Rate
R V
1990 100
2000 115
2010 125
Year Limit
E V
1990 100
2000 115
2010 125

If you try to look up the value for 2001 in the 1st CSV file where year is treated as a range (R), 115 will be returned. That’s because 2001 is greater than or equal to 2000 and it’s strictly less than 2010.

If you try to look up the value for 2001 in the 2nd CSV file where year is treated as an exact match (E), 0 will be returned. That’s because 2001 is NOT equal to 1990, 2000, or 2010. (A match occurs ONLY if 2001 is exactly one of the years, and it isn’t.)