Brian Dunning's FileMaker Custom Functions

MRound ( number ; multiple )

Similar to the Excel function, MRound returns a number rounded to the desired multiple.

  Be the first to rate this function Log in to vote

Mislav Kos   Mislav Kos - Show more from this author
Soliant Consulting
https://www.soliantconsulting.com/

Share on Facebook Share on Twitter

  Sample input:
MRound ( 10 ; 3 )
  Sample output:
9

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

MRound returns a number rounded to the desired multiple.

Examples:
MRound ( 10 ; 3 ) = 9
MRound ( -10 ; -3 ) = -9
MRound ( 1.3 ; 0.2 ) = 1.4
MRound ( 2.2 ; 0.5 ) = 2
MRound ( 2.3 ; 0.5 ) = 2.5

The two parameters must be numbers, and they must have the same sign. The 'multiple' parameter cannot be zero. The custom function will return "?" if parameter validation fails.

 

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: