Usted está aquí: Help Topics > Customization > Calculation > Calculation operators

Calculation operators

Operators are used in calculations to present the desired values within cells, or as criteria for skipping a line or section. Each operator in a calculation is evaluated in the following order:

  1. ()
  2. *
  3. /
  4. +
  5. -
  6. <
  7. <=
  8. >
  9. >=
  10. =
  11. <>
  12. &
  13. |
  14. ..
  15. ::

Arithmetic operators

Use arithmetic operators to perform mathematical calculations.

Operator Description Syntax Example
* Multiplies two values. value1*value2

2*2

Returns 4.

/ Divides two values. value1/value2

10/2

Returns 5.

+ Adds two values. value1+value2

8+2

Returns 10.

- Subtracts two values. value1-value2

10-2

Returns 8.

Comparison operators

Use comparison operators to compare between two values.

Operator Description Syntax Example
< Less than

value1<value2

C1<C2

Condition is true if cell C1 is less than cell C2.

<= Less than or equal to

value1<=value2

C1<=C2

Condition is true if cell C1 is less than or equal to cell C2.

> Greater than

value1>value2

C1>C2

Condition is true if cell C1 is greater than cell C2.

>= Greater than or equal to

value1>=value2

C1>=C2

Condition is true if cell C1 is greater than or equal to cell C2.

= Equal to

value1 = value2

C1 = C2

Condition is true if cell C1 is equal to cell C2.

<> Not equal to

value1<>value2

C1<>C2

Condition is true if cell C1 does not equal cell C2.

Logical operators

Use logical operators to combine conditions or calculations.

Operator Description Syntax Example
&

Combines two conditions. Both conditions must be found true in order for the expression to be true.

condition1&condition2

C1000>=0&C100>=0

...where C1000 = 500 and C100 = 600.

Both conditions are true, therefore the expression is true.

|

Combines two calculations. Either calculation must be true in order for the expression to be true.

calculation1|calculation2

C1000>=0|C100>=0

...where C1000 = 1 and C100 = -50.

The first condition is true and therefore the expression is true.

Cell address operators

Use cell address operators in calculations that include ranges of cells or table relative cells.

Operator Description Syntax Example
..

References a range of cells in a calculation.

Calculation(first cell..last cell)

Sum(a1001..c1010)

Sums all the cells from a1001 to c1010.

::

Specifies an absolute reference to document cells, removing any ambiguity between document cells and fields or table cells that are similarly named.

Calculation(::cell number)

LTRIM(AM->SCHEDULE) = ::c1

...where AM is the Trial Balance database that contains a field labeled C1, and c1 is a CaseView cell containing a text string.

Using :: before the cell reference ensures that it uses the CaseView cell rather than the database field.