Some Excel Useful Functions

Some Excel Useful Functions
COUNTIF, INDEX, MATCH,
VLOOKUP, HLOOKUP
anestis.toptsis.1520
1
Countif: # of occurrences of a value within
a set of values.
l =COUNTIF(B2:B14,"A+")
l Count all “A+”’s in the
table B2:B14
(Answer: 0)
l Usually, we use
LOOKUP followed by
using COUNTIF.
anestis.toptsis.1520
57
74
57
84
73
82
67
64
83
80
80
50
76
D+
B
D+
A
B
A
C+
C
A
A
A
D
B+
2
INDEX: = index( theArray, 7, 4)
l  INDEX is a simple function.
l  Given the location (row # and column #) inside an array,
it produces the value stored in that location.
4
Column #
The
array
Result
value
7
Row #
anestis.toptsis.1520
3
MATCH: =MATCH(7,LookUpArray,0)
l Returns the position
of an item, rather than
the item itself.
Match_type:
1 or 0 or -1
LookUpArray to be
searched.
Lookup value. Given this
value, find and return its
position in the array.
11
7
Returned value (row
number containing the lookup
value).
anestis.toptsis.1520
4
… MATCH cont’d
l  match_type
¡ +1 : find largest value which is smaller than the lookup value.
The array must in in ascending order.
¡ 0 : find exact match. The array can be in any order.
¡ -1 : find smallest value which is bigger than the lookup value.
The array has to be in descending order.
anestis.toptsis.1520
5
VLOOKUP :: =VLOOKUP(7,theArray,
12,range_lookup)
12
Specified column from
where to return value
theArray
LookupValue (desired value
to find).
Returned value
7
Column to look for lookup value
(always the left-most column of
the array).
anestis.toptsis.1520
6
VLOOKUP cont’d :: range_lookup
l Range_lookup is TRUE or FALSE
l If VLOOKUP cannot find the lookup_value
and range_lookup is TRUE, then it uses
the largest value that is less than or equal
to the lookup_value.
l If range_lookup is FALSE, then an exact
match is required (and if VLOOKUP
cannot find the exact lookup_value then it
returns error (#N/A).
anestis.toptsis.1520
7
HLOOKUP :: =HLOOKUP(7,theArray,
12,range_lookup)
Row to look for lookup value
(always the top-most row of
the array).
7
LookupValue (desired value
to find).
12
Specified row from
where to return
value
Returned value
theArray
anestis.toptsis.1520
8
HLOOKUP cont’d :: range_lookup (same as
in VLOOKUP)
l Range_lookup is TRUE or FALSE
l If HLOOKUP cannot find the lookup_value
and range_lookup is TRUE, then it uses
the largest value that is less than or equal
to the lookup_value.
l If range_lookup is FALSE, then an exact
match is required (and if VLOOKUP
cannot find the exact lookup_value then it
returns error (#N/A).
anestis.toptsis.1520
9
THE END
anestis.toptsis.1520
10