Using Operators

Using Operators

In Datameer X you can easily use operators in formulas, such as > (greater than), == (equal to), or + (plus). These operators can be used instead of using the functions in the Formula BuilderYou can't enter an operator using the Formula Builder. You can only enter it into the Formula bar. Operators use the following syntax: argument1 OPERATOR argument2

Using Operators in Datameer

To use operators:

  1. Click the data area of a column. If there is already a formula associated with that column, the formula is displayed above the workbook beside the fx symbol. Your cursor is in the Formula bar and you can start typing immediately.

  2. Enter or edit a formula using operators.

  3. Press enter.

General Operators in Formulas

Operator

Description

Operator

Description

( and )

The arguments of a function are contained within parentheses

;

Multiple arguments within a Datameer-defined function are separated with a semicolon

#ColumnName

References a column in the current workbook sheet

#SheetName!ColumnName

References a column form another workbook sheet

Arithmetic Operators

Operator

Description

Result

Operator

Description

Result

+

additive operator (plus)

Adds argument1 and argument2

-

subtraction operator

Subtracts argument2 from argument1

*

multiplication operator

Multiplies argument1 and argument2

/

division operator

Divides argument1 by argument2

%

modulo or remainder operator

Returns the remainder when argument1 is divided by argument2

Examples

Formula

Returns

Formula

Returns

#B + 200

Returns the sum of the value in column B plus 200

#MyList1 + #MyList2

Returns a single list with the values of both lists concatenated ["MyList1", "MyList2"]

#sheet1!count * 5

Returns the product of the values in column count from sheet1 multiplied by 5

#B % 7

Returns only the remainder after dividing the values in column B by 7

Equality and Relational Operators

These operators make it easy to determine the range of your values.

Operator

Description

Result

Operator

Description

Result

>

greater than

Returns a Boolean value (either true or false)

>=

greater than or equal to

Returns a Boolean value (either true or false)

==

equal to

Returns a Boolean value (either true or false)

!=

not equal to

Returns a Boolean value (either true or false)

<=

less than or equal to

Returns a Boolean value (either true or false)

<

less than

Returns a Boolean value (either true or false)

You can use more than one equality or relational operator in a formula. To combine operators you can use either the AND operator && or the OR operator || (two pipes) - see below. You can also use the AND() function or the OR() function.

Examples

Formula

Returns

Formula

Returns

#B < 200

Returns true if the value in column B of the current sheet is less than 200 and false if it is greater than or equal to 200

#sheet1!count >= 300

Returns true if the value in the column titled count from sheet1 is greater than or equal to 300 and false if it is less than 300

#B > 200 && #B < 500

Returns true if the value of column B of the current sheet is greater than 200 and less then 500, and returns false if the value is less than 200 or greater than 500

AND(#B > 200; #B < 500)

This is the same as #B > 200 && #B < 500, here we are using the AND() function instead of the AND operator