Beruflich Dokumente
Kultur Dokumente
Formula
A sequence of values, cell references, names, functions, or operators in a cell that together produce a new value.
A formula always begins with an equal sign (=).
Formulas Formulas are equations that perform calculations on values in your worksheet. You can create a
formula that performs arithmetic operations, such as adding numbers together. Or you can create a formula that
analyzes a complex model of numbers.
Enter a formula
For information about how formulas calculate values, click
1. Click the cell in which you want to enter the formula.
2. Type = (an equal sign).
Written By:
=5+2*3
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
Calculation operators in formulas
Operators specify the type of calculation that you want to perform on the elements of a formula. Microsoft
Excel includes four different types of calculation operators: arithmetic, comparison, text, and reference.
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
Negation
31
1
* (asterisk)
Multiplication
3*3
/ (forward slash)
Division
3/3
% (percent sign)
Percent
20%
^ (caret)
Exponentiation
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
A1>B1
Less than
A1<B1
A1>=B1
A1<=B1
Not equal to
A1<>B1
Text concatenation operator Use the ampersand (&) to join, or concatenate, one or more text strings to
produce a single piece of text.
Written By:
Text
operator
Meaning
& (ampersand)
Example
Reference operators Combine ranges of cells for calculations with the following operators.
Reference
operator
Meaning
: (colon)
Example
B5:B15
, (comma)
Operator
: (colon)
Description
Reference operators
(single space)
, (comma)
Negation (as in 1)
Percent
Exponentiation
* and /
+ and
&
Comparison
Edit a formula
1. Click the cell that contains the formula you want to edit.
If the cell contains a hyperlink, click a cell next to the cell you want to edit, and then use an arrow key to
select the cell with the formula you want to edit.
Written By:
COUNT
Counts the number of cells that contain numbers and numbers within the list of arguments. Use COUNT to get
the number of entries in a number field in a range or array of numbers.
Syntax
COUNT(value1,value2, ...)
Value1, value2, ... are 1 to 30 arguments that can contain or refer to a variety of different types of data, but
only numbers are counted.
COUNT(A4:A7) may equals 2
COUNT(A1:A7, 2) may equals 4
4. ABS
Returns the absolute value of a number. The absolute value of a number is the number without its sign.
Syntax
ABS(number)
Number is the real number of which you want the absolute value.
Examples
ABS(2) equals 2
ABS(-2) equals 2
If A1 contains -16, then:
Written By:
SQRT(ABS(A1))
equals 4
5. SIN
Returns the sine of the given angle.
Syntax
SIN(number)
Number is the angle in radians for which you want the sine. If your argument is in degrees, multiply it by
PI()/180 to convert it to radians.
Examples
SIN(PI()) equals 1.22E-16, which is approximately 0 (zero). The sine of pi is zero.
SIN(PI()/2) equals 1
SIN(30*PI()/180) equals 0.5, the sine of 30 degrees
6COS
Returns the cosine of the given angle.
Syntax
COS(number)
Number is the angle in radians for which you want the cosine. If the angle is in degrees, multiply it by PI()/180
to convert it to radians.
Examples
COS(1.047) equals 0.500171
COS(60*PI()/180) equals 0.5, the cosine of 60 degrees
7. TAN
Returns the tangent of the given angle.
Syntax
TAN(number)
Number is the angle in radians for which you want the tangent. If your argument is in degrees, multiply it by
PI()/180 to convert it to radians.
Examples
TAN(0.785) equals 0.99920
TAN(45*PI()/180) equals 1
8- POWER
Returns the result of a number raised to a power.
Syntax
POWER(number,power)
Number is the base number. It can be any real number.
Power is the exponent to which the base number is raised.
Remark
The "^" operator can be used instead of POWER to indicate to what power the base number is to be raised, such
as in 5^2.
Examples
Written By:
POWER(5,2) equals 25
POWER(98.6,3.2) equals 2401077
POWER(4,5/4) equals 5.656854
9- MAX
Returns the largest value in a set of values.
Syntax
MAX(number1,number2,...)
Number1,number2,... are 1 to 30 numbers for which you want to find the maximum value.
Examples
If A1:A5 contains the numbers 10, 7, 9, 27, and 2, then:
MAX(A1:A5) equals 27
MAX(A1:A5,30) equals 30
10- MIN
Returns the smallest number in a set of values.
Syntax
MIN(number1,number2, ...)
Number1, number2,... are 1 to 30 numbers for which you want to find the minimum value.
Examples
If A1:A5 contains the numbers 10, 7, 9, 27, and 2, then:
MIN(A1:A5) equals 2
MIN(A1:A5, 0) equals 0
11GEOMEAN
Returns the geometric mean of an array or range of positive data. For example, you can use GEOMEAN to
calculate average growth rate given compound interest with variable rates.
Syntax
GEOMEAN(number1,number2, ...)
Number1,number2,... are 1 to 30 arguments for which you want to calculate the mean. You can also use a
single array or a reference to an array instead of arguments separated by commas.
Example
GEOMEAN(4,5,8,7,11,4,3) equals 5.476987
12-
HARMEAN
Returns the harmonic mean of a data set. The harmonic mean is the reciprocal of the arithmetic mean of
reciprocals.
Syntax
HARMEAN(number1,number2, ...)
Number1,number2,... are 1 to 30 arguments for which you want to calculate the mean. You can also use a
single array or a reference to an array instead of arguments separated by commas.
Example
HARMEAN(4,5,8,7,11,4,3)
equals 5.028376
Written By:
13- FREQUENCY
Calculates how often values occur within a range of values, and then returns a vertical array of numbers. For
example, use FREQUENCY to count the number of test scores that fall within ranges of scores. Because
FREQUENCY returns an array, it must be entered as an array formula.
Syntax
FREQUENCY(data_array,bins_array)
Data_array is an array of or reference to a set of values for which you want to count frequencies. If data_array
contains no values, FREQUENCY returns an array of zeros.
Bins_array is an array of or reference to intervals into which you want to group the values in data_array. If
bins_array contains no values, FREQUENCY returns the number of elements in data_array.
Example
Suppose a worksheet lists scores for a test. The scores are 79, 85, 78, 85, 83, 81, 95, 88, and 97 and are entered
into A1:A9, respectively. The data_array would contain a column of these test scores. The bins_array would be
another column of intervals by which the test scores are grouped. In this example, bins_array would be C4:C6
and would contain the values 70, 79, 89. When FREQUENCY is entered as an array, the number of scores
corresponding to the letter grade ranges 0-70, 71-79, 80-89, and 90-100, are counted. This example assumes all
test scores are integers. The following formula is entered as an array formula after you select four vertical cells
adjacent to your data. The fourth number, 2, is the count of the two values (95 and 97) that are greater than the
highest interval (89).
FREQUENCY(A1:A9,C4:C6)
equals {0;2;5;2}
IF
Returns one value if a condition you specify evaluates to TRUE and another value if it evaluates to FALSE.
Use IF to conduct conditional tests on values and formulas.
Syntax
IF(logical_test,value_if_true,value_if_false)
Logical_test is any value or expression that can be evaluated to TRUE or FALSE. For example, A10=100 is a
logical expression; if the value in cell A10 is equal to 100, the expression evaluates to TRUE. Otherwise, the
expression evaluates to FALSE. This argument can use any comparison calculation operator.
Examples
Written By:
On a budget sheet, cell A10 contains a formula to calculate the current budget. If the result of the formula in
A10 is less than or equal to 100, then the following function displays "Within budget". Otherwise, the function
displays "Over budget".
IF(A10<=100,"Within budget","Over budget")
In the following example, if the value in cell A10 is 100, then logical_test is TRUE, and the total value for the
range B5:B15 is calculated. Otherwise, logical_test is FALSE, and empty text ("") is returned that blanks the
cell that contains the IF function.
IF(A10=100,SUM(B5:B15),"")
Suppose an expense worksheet contains in B2:B4 the following data for "Actual Expenses" for January,
February, and March: 1500, 500, 500. C2:C4 contains the following data for "Predicted Expenses" for the same
periods: 900, 900, 925.
You can write a formula to check whether you are over budget for a particular month, generating text for a
message with the following formulas:
IF(B2>C2,"Over Budget","OK")
IF(B3>C3,"Over Budget","OK")
equals "OK"
Suppose you want to assign letter grades to numbers referenced by the name AverageScore. See the following
table.
If AverageScore is
Then return
Greater than 89
From 80 to 89
From 70 to 79
From 60 to 69
Less than 60
In the preceding example, the second IF statement is also the value_if_false argument to the first IF statement.
Similarly, the third IF statement is the value_if_false argument to the second IF statement. For example, if the
first logical_test (Average>89) is TRUE, "A" is returned. If the first logical_test is FALSE, the second IF
statement is evaluated, and so on.
=IF(S13>=87,"A",IF(S13>=80,"B+",IF(S13>=70,"B",IF(S13>=60,"C",IF(S13>=50,"D",IF(S13<50,"F"))))))