Вы находитесь на странице: 1из 15

FORMULA & FUNCTION

FORMULA
- an equation that performs operation on the worksheet data

To Construct a Formula
1. A formula always begins with an equal sign(=)
2. Following the equal sign are the elements to be calculated which are
separated by calculation operators.
3. It calculates the formula from left to right, according to a specific
order for each operator in the formula called Order of Precedence.
ELEMENTS & SAMPLE FORMULA
Element Example Description
It means that numeric value of 25 will be
1. Numbers = 10 + 25
added to the numeric value 10.
In this example, column A row 1 or simply A1
is the reference cell that can contain any value
2. Cell Reference = A1 B1
wherein you will subtract the numeric value of
cell reference B1.
The name Salary is composed of a range of
3. Reference Names = A1 * Salary cells defined earlier and now used in a
formula
4. Functions = SUM(A1:A10) + Salary The sum function is being used.
5. Operators = A1/2+25*22-3 Mathematical operators commonly used
NAMING CELLS (REFERENCE NAMES)
Names in Calc can contain letters, numeric characters, and some special
characters. Names must start with a letter or an underline character.
Allowed special characters:
underline (_)
period (.) - allowed within a name, but not as first or last character
blank ( ) - allowed within a name, but not as first or last character, and not
for a cell range
Names must not be the same as cell references. For example, the name
A1 is invalid because A1 is a cell reference to the top left cell.
Names must not start with the letter R followed by a number. See the
ADDRESS function for more information.
Names for cell ranges must not include blanks
NAMING CELLS (REFERENCE NAMES)
Use the Define Names dialog to define names for formulas or
parts of formulas you need more often. In order to specify range
names:
Select a cell or range of cells, then choose Insert - Names - Define.
The Define Names dialog appears.
Type the name of the selected area in the Name field. Click Add.
The newly defined name appears in the list below. Click OK to close
the dialog.
CALCULATION OPERATORS IN FORMULA
Operators specify the type of calculation that you want to perform
on the elements of a formula.
Types of Operators
Arithmetic Operators
Comparison Operators
Text Concatenation
ARITHMETIC
+ (plus sign) Addition
- (minus sign) Subtraction
* (asterisk) Multiplication
/ (forward slash) Division
^ (caret) Exponentiation
COMPARISON OPERATORS
= (equal sign) Equal to
< (less than sign) Less than
>= (greater than or equal sign) Greater than or equal to
<= (less than or equal sign) Less than or equal to
> (greater than) Greater than
<> (not equal) Not equal
TEXT CONCATENATION
& (Ampersand) Connects, concatenates, two values to
produce one continuous text value
ORDER OF OPERATIONS IN FORMULA
Order Operator Description
1 () Parentheses
2 % Percentage
3 ^ Exponentiation
4 * and / Multiplication and Division
5 + and - Addition and Subtraction
6 & Concatenation
7 =, <, <=, >, >=, <> Comparison Operators
BASIC FUNCTIONS
Function Example Description
SUM =SUM(A1:A100) Finds the sum of cells A1 through
A100
AVERAGE =AVERAGE(B1:B10) Finds the average of cells B1 through
B10
PRODUCT = PRODUCT(E2,20%) Finds the product of cell E2 and .2
MAX = MAX(C1:C100) Returns the highest number from
cells C1 through C100
MIN = MIN(D1:D100) Returns the lowest number from cells
D1 through D100
SQRT = SQRT(D10) Finds the square root of the value in
cell D10
TODAY = TODAY() Returns the current date (leave the
parentheses empty)
OTHER FUNCTIONS
ROUND - rounds off a number to a specified number of digits
Syntax: ROUND(number, num_digits)
Arguments:
Number is the number to be rounded off.
Num_digits is the number of digits to a number will be rounded off.

COUNT - counts the number of all cells containing numbers, including date, time and
formulas.
Syntax: COUNT(Value1, Value2)
Arguments:
Value1, Value2are arguments that you want to count.
OTHER FUNCTIONS
COUNTIF - counts the number of cells based on a given criteria.
Syntax: COUNTIF(range, criteria)
Arguments:
Range is the range of cells from which you want to count cells.
Criteria is the condition that defines which cells will be counted; It can be in the
form of numbers, expressions, or texts.
E.G. =COUNTIF(B3:B8,>=74.5)
OTHER FUNCTIONS
IF - evaluates a condition you specify; returns one value if it is TRUE and another value if it is FALSE
Syntax: IF(logical_test, value_if_true, value_if_false)
Arguments:
Logical_test is any value or expression that can be evaluated to TRUE or FALSE.
Value_if_true is the value that is returned if logical_test proves TRUE.
Value_if_false is the value that is returned if logical_test proves FALSE.
E.G. =IF(B2>=74.5,Passed,Failed)
OTHER FUNCTIONS
Nested If - constructs more elaborate tests. Microsoft Excel provides up to seven IF
functions that may be nested as value_if_true and value_if_false arguments.
E.G. Numerical equivalents of Letter grades are as follows:
A 90 100
B 85 89
C 80 84
D 75 79
E below 75

=IF(B2>89,A,IF(B2>84,B,IF(B2>79,C,IF(B2>75,D,E)))

Вам также может понравиться