Brian Dunning's FileMaker Custom Functions

RoundCurrency ( Amount )

Rounds currency to desired denominations

  Average rating: 4.4 (21 votes) Log in to vote

Sean Moore   Sean Moore
inRESONANCE Inc.
http://www.inresonance.com

Share on Facebook Share on Twitter

  Sample input:
RoundCurrency (1.23)
  Sample output:
1.25

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

This function provides a tool for rounding currency to any desired denomination, not just those that are base 10. Note, for very small amounts, unless the input is actually 0, the minimum output is the minimum denomination.

This function could be useful for building solutions that handle currency but may be distributed to countries with different cash rounding policies. Implement it throughout a solution, and you only have to change your settings once.

 

Comments

Serge   Serge
May 17, 2019
Seems to work like a charm!
(I've modified it for my own use to have precision and roundingDirection as part of the parameters)

THANKS!
 

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: