Please enable JavaScript to view this site.

Returns the key of the closest matching numerical column value in the dictionary. The key is returned as a string so that it can be used in a nested call that reads a cell value.

 

string FindClosestDicKeyByCol(string dictionaryName, string columnName; double value; [int closestHigherOrLower])

 

dictionaryName

The name of the dictionary to find the closest key in.

columnName

The name of the dictionary column to search.

value

The value to find the closest match for.

closestHigherOrLower

Optional filter. Find closest key = 0, Find closest higher or equal key = 1, Find closest lower or equal key = -1

Examples

FindClosestDicKeyByCol("Size"; "Height"; 2.5; 1)

Returns the key of the row with the "Height" column value that is closest higher or equal to 2.5 in the dictionary "Size".

Remarks

This method requires that the keys and referred column of the dictionary are numerical or can be converted to double using "NumberFormatInfo.InvariantInfo".

  

Keyboard Navigation

F7 for caret browsing
Hold ALT and press letter

This Info: ALT+q
Page Header: ALT+h
Topic Header: ALT+t
Topic Body: ALT+b
Contents: ALT+c
Search: ALT+s
Exit Menu/Up: ESC