You are on page 1of 29

SUM AVERAGE

PRODUCT COUNT

COUNTA

COUNTBLANK

ISBLANK

COUNTIF

MID CONCATENATION

LEFT

RIGHT

SQRT ABS
LOWER UPPER

MEAN MODE

IF NESTED IF
MIN

Answer example
$32.64 $37.69 $48.29
24 MAX
$40.55 $32.65 $36.81
$47.16 text text
$35.08 $51.13 $49.84
?
$35.11 text $33.32
$35.76 $58.60 $46.28

?
$35.08 $51.13 $49.84
$35.11 $48.63 $33.32
$35.76 $58.60 $46.28
?

POWER

SUMIF
PROPER

MEADIAN

SUMPRODUCT
The IF Function

Data
50

Formula

=IF(B5<=100,"Within budget","Over budget")

=IF(B5=100,SUM(BigRange),"")

Notes on the IF Function


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.

Value_if_true   is the value that is returned if logical_test is TRUE. For example,


if this argument is the text string "Within budget" and the logical_test argument
evaluates to TRUE, then the IF function displays the text "Within budget".
If logical_test is TRUE and value_if_true is blank, this argument returns 0 (zero).
To display the word TRUE, use the logical value TRUE for this argument.
Value_if_true can be another formula.

Value_if_false   is the value that is returned if logical_test is FALSE. For example,


if this argument is the text string "Over budget" and the logical_test argument
evaluates to FALSE, then the IF function displays the text "Over budget".
If logical_test is FALSE and value_if_false is omitted, (that is, after
value_if_true, there is no comma), then the logical value FALSE is returned.
If logical_test is FALSE and value_if_false is blank (that is, after value_if_true,
there is a comma followed by the closing parenthesis), then the value 0 (zero)
is returned. Value_if_false can be another formula.

Remarks
Up to seven IF functions can be nested as value_if_true and value_if_false
arguments to construct more elaborate tests.
When the value_if_true and value_if_false arguments are evaluated,
IF returns the value returned by those statements.
If any of the arguments to IF are arrays, every element of the array
is evaluated when the IF statement is carried out.
Return to Contents

Description (Result)
If the value in Cell B5 is less than or equal to 100, then the
formula displays "Within budget". Otherwise, the function
displays "Over budget". Result: Over budget
If the number above is 100, then the range named
"BigRange" is summed. Otherwise, empty text ("") is returned.
Result: empty text

ify evaluates to TRUE

ues and formulas.

,value_if_false)

that can be evaluated to TRUE or FALSE.


ion; if the value in cell A10 is equal to 100,
wise, the expression evaluates to FALSE.
alculation operator.

ned if logical_test is TRUE. For example,


budget" and the logical_test argument
displays the text "Within budget".
s blank, this argument returns 0 (zero).
l value TRUE for this argument.

ned if logical_test is FALSE. For example,


budget" and the logical_test argument
displays the text "Over budget".
e is omitted, (that is, after
the logical value FALSE is returned.
is blank (that is, after value_if_true,
parenthesis), then the value 0 (zero)

alue_if_true and value_if_false

arguments are evaluated,

every element of the array


Nested IF Statements

Score
45
90
78

Formula
=IF(B5>89,"A",IF(B5>79,"B", IF(B5>69,"C",IF(B5>59,"D","F"))))
=IF(B6>89,"A",IF(B6>79,"B", IF(B6>69,"C",IF(B6>59,"D","F"))))
=IF(B7>89,"A",IF(B7>79,"B", IF(B7>69,"C",IF(B7>59,"D","F"))))

Notes:
In the examples above, 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.

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
Return to Contents

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

t logical_test

Then return
A
B
C
D
F
IF - Budget example

Actual Expenses
$1,500
$500

Formula
=IF(B5>C5,"Over Budget","OK")
=IF(B6>C6,"Over Budget","OK")
Return to Contents

Budgeted Expenses
$900
$900

Description (Result)
Checks whether the first row is over budget. Result: Over Budget
Checks whether the second row is over budget. Result: OK
The SUMIF function Return to Contents

Property Value Commission


$100,000 $7,000
$200,000 $14,000
$300,000 $21,000
$400,000 $28,000

Formula Description (Result)


=SUMIF(B5:B8,">160000",C5:C8)
Sum commissions for property values over
$160,000. Result: $63,000.

Notes:
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.
400000

$14,000
$21,000
$28,000
$63,000

efines which cells


, ">32", "apples".

match the criteria.


The COUNTIF function

Fruit Data
apples
oranges
peaches
apples

Formula

=COUNTIF(B5:B8,"apples")

=COUNTIF(C5:C8,">55")

Notes
Counts the number of cells within a range that meet the given criteria.

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".
Return to Contents

Number Data 2
86
54
75
32

Description (Result)
Count the number of cells holding "apples" in the
"Fruit Data" column above. Result: 2
Count the number of cells with a value > 55 in the
"Number Data" column above. Result: 2

ithin a range that meet the given criteria.

om which you want to count cells.


orm of a number, expression, or
will be counted. For example,
32, "32", ">32", "apples".
Return to Contents
SUMPRODUCT

Array 1 Array 2
3 2
8 6
1 5
4 7
6 7
9 3

Formula Description (Result)

Multiplies the components of the


two arrays and sums the products —
=SUMPRODUCT(B5:C7, D5:E7)
that is, 3*2 + 8*6 + 1*5 + 4*7 + 6*7 +
9*3. Result: 156

Notes:
Multiplies corresponding components in the given arrays, and returns the sum of those products.
Syntax: SUMPRODUCT(array1,array2,array3, ...)
Array1, array2, array3, ...   are 2 to 30 arrays whose components you want to multiply and then add.

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.
Return to Contents

urns the sum of those products.

you want to multiply and then add.

not, SUMPRODUCT returns the


e not numeric as if they were zeros.
PI FUNCTION

=PI() 3.141593
INDEX & MATCH in Excel - a better alternative to VLOOKUP

Index Function INDEX(array, row_num, [column_num])


Match Function MATCH(lookup_value, lookup_array, [match_

4 top benefits of using MATCH INDEX in Excel OVER


VLOOKUP
1 Right to left lookup.
2 Insert or delete columns safely
3 No limit for a lookup value's size
4 Higher processing speed.
Rank Country Capital Population
9 Peru Lima 8,481,415 Max: Err:504
8 Mexico Mexico City 8,851,080 Min: Err:504
7 Iran Tehran 9,110,347 Average: #DIV/0!
6 Indonesia Jakarta 10,187,595
5 South Korea Seoul 10,528,774
4 Russia Moscow 11,541,000
3 Japan Tokyo 13,189,000
2 India New Delhi 17,838,842
1 China Beijing 20,693,000

example
OKUP

y, row_num, [column_num])
alue, lookup_array, [match_type])

X in Excel OVER
Use INDEX as a substitute for
VLOOKUP when the value you
want to return is to the left of
the lookup column.
Product Price Description
Boom01 $15.00 Flying Range is 10
Boom02 $30.00 Flying Range is 20
Boom03 $40.00 Flying Range is 50
Boom04 $45.00 Flying Range is 60
Boom05 $65.00 Flying Range is 70
Boom06 $69.00 Flying Range is 80
Boom07 $100.00 Flying Range is 85
Boom08 $110.00 Flying Range is 110
Boom09 $165.00 Flying Range is 160

1-Way Lookup:
Lookup Column to
Left
Descriptio Product
Flying RangBoom06 **[column_num] argument is optional. When you have a one
way lookup, row_num can be used for the relative position of
the item in a list (row or column).

Use INDEX, MAX & MATCH to


find student with max score
Name Score
Student 1 53
Student 2 18
Student 3 99
Student 4 45
Student 5 19
Student 6 27
Student 7 85
Student 8 0

Lookup
Name w
Max
Max Score
99 Student 3 <== lookup name w max score

Vendor1 Vendor2 Vendor3 Vendor4 Vendor5 Low Bid Vendor for Low Bid
$85.00 $48.60 $43.53 $40.08 $47.92 $40.08 =INDEX(A36:E36,MATCH(F37,A37:E37,0))
$57.68 $31.80 $52.78 $31.42 $55.19 $31.42
$53.32 $32.64 $37.69 $48.29 $41.59 $32.64
$35.20 $40.55 $32.65 $36.81 $41.14 $32.65
$56.72 $47.16 $36.42 $49.56 $39.25 $36.42
$47.91 $35.08 $51.13 $49.84 $42.12 $35.08
$34.81 $35.11 $48.63 $33.32 $37.83 $33.32
$42.25 $35.76 $58.60 $46.28 $40.53 $35.76
$40.14 $42.31 $37.62 $59.97 $42.57 $37.62
$36.48 $40.79 $53.24 $51.01 $51.24 $36.48
$38.57 $40.06 $54.71 $39.70 $54.73 $38.57
$52.66 $43.61 $59.98 $34.61 $52.65 $34.61
1-Way Lookup Ranges Horizontal

**Note: If it is a one way lookup, INDEX is


programmed to use the row_num for
either a row number or column number
(because it is only a 1-way lookup).
Rank Country 1950 2000 2015
1 India 357,561 1,008,937 1,230,484 Country: USA
2 China 554,760 1,275,133 1,410,217 Year: 2015
3 USA 157,813 283,230 321,225 Population: 321,225
4 Pakistan 39,659 141,256 204,267
5 Indonesia 79,538 212,092 250,068
6 Nigeria 29,790 113,862 165,313
7 Bangladesh 41,783 137,439 183,159
8 Brazil 53,975 170,406 201,393
9 Congo 12,184 50,948 84,045
10 Ethiopia 18,434 62,908 89,765 vlookup limitation

#N/A

INDEX and MATCH to lookup in a table that is sorted decending order

Select Rain 4 2-Way lookup


Pipe Size 11 MATCH with -1 (list sorted Descending)
Square Foo 33,300 MATCH with 1 or empty (list sorted Ascending)

Rainfall Rate
Pipe Size ( 1 2 3 4 5 6
15 238,000 119,000 79,333 59,500 47,600 39,650
12 133,200 66,600 44,400 33,300 26,650 22,200
10 82,800 41,400 27,600 20,700 16,580 13,800
8 46,000 23,000 15,330 11,500 9,200 7,670
6 21,400 10,700 7,133 5,350 4,280 3,566
5 13,360 6,680 4,453 3,340 2,672 2,227
4 7,520 3,760 2,506 1,880 1,504 1,253
3 3,288 1,644 1,096 822 657 548
1 0 0 0 0 0 0
up limitation

You might also like