CS 105

Week 10

Midterm 1: Second Chance

MP5: Second Excel MP

Due: Tuesday, March 31 (8:00pm)
On the course website

MP5

Random Numbers

Excel Functions

Arithmetic Functions

SUM, AVERAGE, COUNT
SUMIFS, AVERAGEIFS, COUNTIFS
MAX, MIN

Lookup Functions

INDEX, MATCH

INDEX / MATCH

The MATCH function searches for a specified item in a range of cells, and then returns the relative position of that item in the range.

INDEX returns the value of an element in a table or an array, selected by the row and column number indexes.

INDEX / MATCH

=MATCH(lookup_value, lookup_array, [match_type])
=MATCH(23, B6:B8, 0)
A B
6 Red 18
7 Yellow 23
8 Blue 7
=MATCH(23, B6:B8, 0)  ==>  2

INDEX / MATCH

=INDEX(array, row_num, [column_num])
=INDEX(A6:A8, 2, 1)
A B
6 Red 18
7 Yellow 23
8 Blue 7
=INDEX(A6:A8, 2, 1)  ==>  "Yellow"

INDEX / MATCH

=MATCH(23, B6:B8, 0)
=INDEX(A6:A8, 2, 1)
=INDEX(A6:A8, MATCH(23, B6:B8, 0), 1)

VLOOKUP

Use the VLOOKUP function to search the first column of a range of cells, and then return a value from any cell on the same row of the range.

=VLOOKUP(lookup_value,
         table_array,
         col_index_num,
         [range_lookup])

Spreadsheet

Google Sheet

Excel

Download