Brian Dunning's FileMaker Custom Functions

roundToNumberInList ( target ; array ; operator )

Round a target value to nearest number in given list

  Be the first to rate this function Log in to vote

Jonni™   Jonni™ - Show more from this author

Share on Facebook Share on Twitter

  Sample input:
roundToNumberInList ( 22 ; List ( 0;20;40;70;100;110 ) ; 1 )
  Sample output:
40

  Function definition: (Copy & paste into FileMaker's Edit Custom Function window)

Round a passed target value to the nearest number in a given list of numbers that are separated by a carriage return. Rounding up or down is determined by the operator flag 0 for down and 1 for up.

 

Comments

Log in to post comments.

 

Note: these functions are not guaranteed or supported by BrianDunning.com. Please contact the individual developer with any questions or problems.

Support this website.

This library has been a free commmunity resource for FileMaker users and developers for 20 years. It receives no funding and has no advertisements. If it has helped you out, I'd really appreciate it if you could contribute whatever you think it's worth: