Friday, January 3, 2020

MATCH (Looks up values in a reference or array)














What Does It Do?
This function looks for an item in a list and shows its position.
It can be used with text and numbers.
It can look for an exact match or an approximate match.
Syntax
=MATCH(WhatToLookFor,WhereToLook,TypeOfMatch)
The TypeOfMatch either 0, 1 or -1.

Using 0 will look for an exact match. If no match is found the #NA error will be shown.

Using 1 will look for an exact match, or the next lowest number if no exact match exists.
   If there is no match or next lowest number the error #NA is shown.
   The list of values being examined must be sorted for this to work correctly.

Using -1 will look for an exact match, or the next highest number if no exact match exists.
   If there is no exact match or next highest number the error #NA is shown.
   The list must be sorted for this to work properly.

Example-1
Using the 0 option suitable for an exact match.
The Ascending list gives the exact match.
The Descending list gives the exact match.
The Wrong Value list cannot find an exact match, so the #NA is shown.




















Example-2
Using the 1 option suitable for a ascending list to find an exact or next lowest match.
The Ascending list gives the exact match.
The Descending list gives the #NA error.
The Wrong Value list finds the next lowest number.


















Example-3
Using the -1 option suitable for a descending list to find an exact or next highest match.
The Ascending list gives the #NA error.
The Descending list gives the exact match.
The Wrong Value list finds the next highest number.
















Example-4
The tables below were used to by a bus company taking booking for bus tours.
They need to allocate a bus with enough seats for the all the passengers.
The list of bus sizes has been entered in a list.
The number of passengers on the tour is then entered.
The =MATCH() function looks down the list to find the bus with enough seats.
If the number of passengers is not an exact match, the next biggest bus will be picked.
After the =MATCH() function has found the bus, the =INDEX() function has been used to look down the list again and pick out the actual bus size required.














Example-5
The tables below were used by a school to calculate the exam grades for pupils.
The list of grade breakpoints was entered in a list.
The pupils scores were entered in another list.
The pupils scores are compared against the breakpoints.
If an exact match is not found, the next lowest breakpoint is used.
The =INDEX() function then looks down the Grade list to find the grade.







No comments:

Post a Comment