Spreadsheet - Arithmetic expressions

Introduction

Arithmetic expressions are simple expressions built with arithmetic operators and constants or references to cells. Operands are the values upon which the operator acts. There are two types of arithmetic operators:

Unary operators that act upon just one element; using only one operand located on the right of the operator. For example:

=-A6

Binary operators that act upon two elements (using two operands, one located on either side of the operator). For example:

=B4 + A6

Arithmetic Operators

Arithmetic operators are as follows:

Operator

Name

Type

Description

+

Addition Operator

Binary

Adds two values

-

Subtraction operator

Binary

Subtracts two values

-

Inversion Operator

Unary

Gives the opposite value of a value

*

Multiplication operator

Binary

Multiplies two values

/

Division operator

Binary

Divides two values

^

Power operator

Binary

Multiplies the left operand to the specified power shown by the right operand

%

Modulo operator

Binary

Gives the remainder of the whole division of two numbers

Use of Parenthesis

Arithmetic operators are used in a predefined order
or priority. To modify the predefined priority, parenthesis must be
used. Here is a table that shows the priority of the operators:

Operator Priority

++++++

()

+++++

%

++++

^

+++

-

++

*

/

+

+

-

When two operators have the same priority, the calculation is performed from left to right.