excel type of operator

6

Click here to load reader

Upload: sirajrock

Post on 13-Dec-2014

540 views

Category:

Education


0 download

DESCRIPTION

 

TRANSCRIPT

Page 1: Excel type of operator

[email protected]

EXCEL ARITHMETIC OPERATORS

SYMBOLS

Page 2: Excel type of operator

[email protected]

Operators specify the kind of calculation that you want to perform on the

elements of a formula. Excel performs calculations in a standard order,

but you can also control the order of calculations.

Arithmetic operators

To perform basic mathematical operations (such as addition, subtraction,

or multiplication), combine numbers, and produce numeric results, use

the following arithmetic operators.

Arithmetic operator Meaning (example)

+ (Plus sign) Addition (3+3)

– (Minus sign) Subtraction (3–1) or negation (–1)

* (Asterisk) Multiplication (3*3)

/ (Forward slash) Division (3/3)

% (Percent sign) Percent (20%)

^ (Caret) Exponentiation (3^2)

Comparison operators

You can compare two values with the following operators. When two

values are compared by using these operators, the result is a logical

value either TRUE or FALSE.

Comparison operator Meaning (example)

= (Equal sign) Equal to (A1=B1)

> (Greater than sign) Greater than (A1>B1)

< (Less than sign) Less than (A1<B1)

>= (Greater than or equal to sign) Greater than or equal to (A1>=B1)

<= (Less than or equal to sign) Less than or equal to (A1<=B1)

<> (Not equal to sign) Not equal to (A1<>B1)

Page 3: Excel type of operator

[email protected]

Join operator

Use the ampersand (&) to join one or more text strings to produce a

single piece of text.

Join operator Meaning (example)

&

(Ampersand)

Joins two values to produce one continuous text value

("North"&"west")

Reference operators

Combine ranges of cells for calculations with the following operators.

Reference

operator Meaning (example)

: (Colon)

Range operator, which produces one reference to all the

cells between two references, including the two references

(B5:B15)

, (Comma) Union operator, which combines multiple references into

one reference (SUM(B5:B15,D5:D15))

(Single

space)

Intersection operator, which produces one reference to

cells common to the two references (B7:D7 C6:C8)

Order of operations in formulas

A formula in Excel always begins with an equal sign (=). Following the

equal sign are the elements to be calculated (the operands), which are

separated by calculation operators. Excel calculates the formula from left

to right, according to a specific order for each operator in the formula.

If you combine several operators in a single formula, Excel performs the

operations in the order shown in the following table. If a formula

contains operators with the same precedence — for example, if a

formula contains both a multiplication and division operator — Excel

evaluates the operators from left to right.

Page 4: Excel type of operator

[email protected]

Operator Description

: (Colon)

, (Comma)

(Single space)

Reference operators

– (Minus sign) Negation (as in -1)

% (Percent sign) Percent

^ (Caret) Exponentiation

* (Asterisk)

/ (Forward slash) Multiplication and division

+ (Plus sign)

– (Minus sign) Addition and subtraction

& (Ampersand) Connects two strings of text

(concatenation)

= (Equal sign)

> (Greater than sign)

< (Less than sign)

>= (Greater than or equal to

sign)

<= (Less than or equal to sign)

<> (Not equal to sign)

Comparison

To change the order of evaluation, enclose in parentheses the part of the

formula to be calculated first. For example, the following formula

produces 11 because Excel calculates multiplication before addition. The

formula multiplies 2 by 3 and then adds 5 to the result.

=5+2*3

Page 5: Excel type of operator

[email protected]

In contrast, if you use parentheses to change the syntax, Excel adds 5

and 2 together and then multiplies the result by 3 to produce 21.

=(5+2)*3

In the following example, the parentheses around the first part of the

formula force Excel to calculate B4+25 first and then divide the result

by the sum of the values in cells D5, E5, and F5.

=(B4+25)/SUM(D5:F5)

How Excel converts values in formulas

When you enter a formula, Excel expects certain kinds of values for

each operator. If you enter a different kind of value than is expected,

Excel sometimes can convert the value.

The formula Produces Explanation

="1"+"2" 3

When you use a plus sign (+), Excel

expects numbers in the formula. Even

though the quotation marks mean that "1"

and "2" are text values, Excel

automatically converts the text values to

numbers.

=1+"$4.00" 5

When a formula expects a number, Excel

converts text if it is in a format that would

usually be accepted for a number.

="6/1/2001"-

"5/1/2001" 31

Excel interprets the text as a date in the

mm/dd/yyyy format, converts the dates to

serial numbers, and then calculates the

difference between them.

Page 6: Excel type of operator

[email protected]

=SQRT("8+1") #VALUE!

Excel cannot convert the text to a number

because the text "8+1" cannot be converted

to a number. You can use "9" or "8"+"1"

instead of "8+1" to convert the text to a

number and return the result of 3.

="A"&TRUE ATRUE

When text is expected, Excel converts

numbers and logical values such as TRUE

and FALSE to text.