Sie sind auf Seite 1von 8

Written By:

IMRAN AHMED MUGHAL

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).

If you click Edit Formula


or Paste Function
, Microsoft Excel inserts an equal sign for you.
3. Enter the formula.
4. Press ENTER.
Tips
You can enter the same formula into a range of cells by selecting the range first, typing the formula, and
then pressing CTRL+ENTER.
Enter a formula that contains a function
1. Click the cell in which you want to enter the formula.
2. To start the formula with the function, click Edit Formula in the formula bar.
3. Click the down arrow next to the Functions box.
4. Click the function you want to add to the formula. If the function does not appear in the list, click More
Functions for a list of additional functions.
5. Enter the arguments.
6. When you complete the formula, press ENTER.
formula bar
A bar at the top of the Microsoft Excel window that you use to enter or edit values or formulas in cells or charts.
Displays the constant value or formula stored in the active cell. To display or hide the formula bar, click
Formula Bar on the View menu.

About constructing formulas


The structure or order of the elements in a formula determine the final result of the calculation. Formulas in
Microsoft Excel follow a specific syntax, or order, that includes an equal sign (=) followed by the elements to
be calculated (the operands), which are separated by calculation operators. Each operand can be a value that
does not change (a constant value), a cell or range reference, a label, a name, or a worksheet function.
Excel performs the operations from left to right according to the order of operator precedence starting
with the equal sign (=). You can control the order of calculation by using parentheses to group operations that
should be performed 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.

Written By:

IMRAN AHMED MUGHAL

=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

3^2 (the same as 3*3)

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

Text concatenation operator Use the ampersand (&) to join, or concatenate, one or more text strings to
produce a single piece of text.

Written By:

IMRAN AHMED MUGHAL

Text
operator

Meaning

& (ampersand)

Example

Connects, or concatenates, two values


to produce one continuous text value

"North" & "wind" produce


"Northwind"

Reference operators Combine ranges of cells for calculations with the following operators.
Reference
operator

Meaning

: (colon)

Example

Range operator, which produces one


reference to all the cells between two
references, including the two
references

B5:B15

, (comma)

Union operator, which combines


SUM(B5:B15,D5:D15)
multiple references into one reference
The order in which Microsoft Excel performs operations in formulas
If you combine several operators in a single formula, Microsoft 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.
To change the order of evaluation, enclose the part of the formula to be calculated first in parentheses. For more
information about calculation operators, click

Operator
: (colon)

Description
Reference operators

(single space)
, (comma)

Negation (as in 1)

Percent

Exponentiation

* and /

Multiplication and division

+ and

Addition and subtraction

&

Connects two strings of text (concatenation)

= < > <= >= <>

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:

IMRAN AHMED MUGHAL

2. In the formula bar, make the changes to the formula.


If you want to edit a function in the formula, edit the arguments in the function.
3. Press ENTER.
FUNCTIONS
1. SUM
Adds all the numbers in a range of cells.
Syntax
SUM(number1,number2, ...)
Number1, number2, ... are 1 to 30 arguments for which you want the total value or sum.
Examples
SUM(3, 2) equals 5
SUM("3", 2, TRUE) equals 6 because the text values are translated into numbers, and the logical value TRUE
is translated into the number 1.
If cells A2:E2 contain 5, 15, 30, 40, and 50:
SUM(A2:C2) equals 50
SUM(B2:E2, 15) equals 150
2. AVERAGE Function
Returns the average (arithmetic mean) of the arguments.
Syntax
AVERAGE(number1,number2, ...)
Number1, numExamples
If A1:A5 is named Scores and contains the numbers 10, 7, 9, 27, and 2, then:
AVERAGE(A1:A5) equals 11
AVERAGE(A1:A5, 5) equals 10
3.

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))

IMRAN AHMED MUGHAL

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:

IMRAN AHMED MUGHAL

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:

IMRAN AHMED MUGHAL

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:

IMRAN AHMED MUGHAL

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")

equals "Over Budget"

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

You can use the following nested IF function:


IF(AverageScore>89,"A",IF(AverageScore>79,"B",
IF(AverageScore>69,"C",IF(AverageScore>59,"D","F"))))

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"))))))

Das könnte Ihnen auch gefallen