# ValueArithmetic ( List1 ; List2 ; operation )

Does basic arithmetic between two value lists, doing one operation (add, subtract, multiply, divide, raise) at a time

Average rating: 5.0 (1 vote) Log in to vote

Bill Thurmes - Show more from this author
MDCA http://www.miyotadca.com |

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

Will take two value lists and perform an arithmetic operation between the nth value of each. For example, when the operation is addition, the first values of each list will be added together to give the first value of the resultant list. Five types of operations are accepted, and each is denoted by a bit of text: "+", "-", "*", "/", "^". Some other names for the operations are accepted.

The two value lists should have the same number of values. Two exceptions:

If one 'list' has only a single value, this function will work like Extend, so all values of the other list will be treated by the operation with the single value

If one list has more (2+) values than the other, the longer list will be trimmed to the same number of values as the other (so make sure you enter the values correctly!).

An empty value will be treated as a 0.

A divide by zero error will give a '?' for that value in the resultant list

Note that operations are MUCH faster when things are all done in memory (such as is done here, between two lists) than when done in fields, where read/write operations slow everything down

## Comments

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