Lookup on two keys
An Excel formula exercise from Formuladrill. Solve it with a formula bar on a live sheet in your browser, and it is checked the moment you submit.
The task
From Dana in Pricing: "Prices depend on both region and product, and a lookup only takes one key. In D2:D7 build a key from the region, a hyphen and the product (so row 2 reads East-Widget), then in G3 return the price for the region in G1 and the product in G2 by looking up a key built the same way."
What this exercise teaches
A concatenated helper key turns a two-criteria lookup into an ordinary one and is easy to audit. SUMIFS over the price column is the other common trick; it works only because each pair appears once and the answer is a number.
A hint if you get stuck
D2 is =A2&"-"&B2, and the same down the column. Then look up G1&"-"&G2 in D2:D7 with XLOOKUP (or INDEX and MATCH) and return the matching price from C2:C7.
Try it now, free, no account needed
The first 15 tasks on Formuladrill are free. Open it on the practice page, solve it, and get instant feedback with a hint. A free account adds the worked solution; Pro adds timed mode and the certificate.
Open this exercise