Practice problems / Lookup & Reference

The vendor at rank N by spend (LARGE + INDEX/MATCH)

Medium Lookup & Reference Accounting pack
Description
Hints 0/4
Solutions 0
–
Test case
1
Reset
Submit
fx
A
B
C
D
E
F
G
1
2
3
4
5
6
7
8
9
10
Loading interactive spreadsheet...
Preparing grid cells and formula calculation engine
○ Ready Enter formula in highlighted cells, then click Submit.

The problem

Problem statement

Spend per vendor is in B2:B6 with names in A2:A6. The rank to report is E1. Put that vendor's name in the Vendor cell E2.

The rank must come from E1, so the same formula answers for the top vendor and the fifth.

Problem data

Show the sheet as a table (selectable, copyable)
The exercise data, as a table
ABDE
1VendorSpendRank2
2Acme42000Vendor
3Bolt18000
4Cobalt26000
5Dana9000
6Echo31000

Notes

LARGE gives the nth biggest number, MATCH finds where it sits, and INDEX returns the name from another column. Sorting the table by hand would work once and then break on the next refresh.

How to approach

Your answer goes in E2.

  1. Target cell is E2
  2. LARGE gets the spend at that rank
  3. MATCH locates it in B2:B6
  4. Shape: =INDEX(?, MATCH(LARGE(?, ?), ?, 0))

Function guide

Related practice

FAQ

How do I find the top vendor by spend?

=INDEX(vendors, MATCH(LARGE(spend, 1), spend, 0)). Change 1 to n for another rank.

Why does a tie give the wrong vendor?

MATCH stops at the first equal value. With ties, sort or add a tiebreaker column; the formula cannot guess which of two equal vendors you meant.