Professional Documents
Culture Documents
Key Excel Functions: AND OR NOT
Key Excel Functions: AND OR NOT
Function name. For a list of available functions, click a cell and press SHIFT+F3.
In certain cases, you may need to use a function as one of the arguments
of another function. For example, the following formula uses a nested
AVERAGE function and compares the result with the value 50.
Note:
To switch between viewing the results and
viewing the formulas that return the results,
choose one of the following techniques:
1. Tools, Options, "View" tab, click "Formulas".
2. Press CTRL+` (grave accent).
3. Tools, Formula Auditing, choose "Formula Auditing mode".
Data
50
Formula
'=IF(A2=100,SUM(B5:B15),"")
Syntax: IF(logical_test,value_if_true,value_if_false)
luates to TRUE
Formula
=IF(A2>89,"A",IF(A2>79,"B", IF(A2>69,"C",IF(A2>59,"D","F"))))
=IF(A3>89,"A",IF(A3>79,"B", IF(A3>69,"C",IF(A3>59,"D","F"))))
=IF(A4>89,"A",IF(A4>79,"B", IF(A4>69,"C",IF(A4>59,"D","F"))))
The letter grades are assigned to numbers using the following key.
If Score is
Greater than 89
From 80 to 89
From 70 to 79
From 60 to 69
Less than 60
Description (Result)
Assigns a letter grade to the first score (F)
Assigns a letter grade to the second score (A)
Assigns a letter grade to the third score (C)
Then return
A
B
C
D
F
Cost/gallon for the first 500 gallons $23
Cost/gallon for gallons above 500 $20
Logic Used for the Olive Oil
Number of gallons: Problem in the Proficiency
10 Exercises
483
500
1600
1,600
483
2001
Formula
=IF(A2>B2,"Over Budget","OK")
=IF(A3>B3,"Over Budget","OK")
Predicted Expenses
900
900
925
Description (Result)
Checks whether the first row is over budget (Over Budget)
Checks whether the second row is over budget (OK)
Data
50
104
Formula
=AND(1<A2, A2<100)
63000
Notes on SUMIF
Syntax: SUMIF(range,criteria,sum_range)
Range is the range of cells you want evaluated.
Criteria is the criteria in the form of a number, expression, or text that defines which cells
will be added. For example, criteria can be expressed as 32, "32", ">32", "apples".
Sum_range are the actual cells to sum.
Remarks
The cells in sum_range are summed only if their corresponding cells in range match the criteria.
If sum_range is omitted, the cells in range are summed.
Data Data
apples 32
oranges 54
peaches 75
apples 86
Syntax: COUNTIF(range,criteria)
Range is the range of cells from which you want to count cells.
Criteria is the criteria in the form of a number, expression, or
text that defines which cells will be counted. For example,
criteria can be expressed as 32, "32", ">32", "apples".
Array 1 Array 1 Array 2
3 4 2
8 6 6
1 9 5
Remarks
The array arguments must have the same dimensions. If they do not, SUMPRODUCT returns the
#VALUE! error value. SUMPRODUCT treats array entries that are not numeric as if they were zeros.
Array 2
7
7
3