Excel Toolkit / Function guides

XLOOKUP in Excel: explanation and examples

Find a site code, then return the corresponding value from another column. Start with one direct calculation.

These examples use the Moon Energy teaching case. All businesses and data are fictional. They are learning examples, not financial or tax advice.

Microsoft’s definition

The XLOOKUP function searches a range or an array, and then returns the item corresponding to the first match it finds.

Read the XLOOKUP function reference on Microsoft Support

Three ways to understand XLOOKUP

Transactional finance

Moon Energy’s finance team is reviewing opening-period supplier bill amounts and a comparison budget.

Return the actual for the chosen site code.

XLOOKUP transactional finance sample cells
RowABCDE
1Site codeSite typeBill net GBPBudgetSelection / threshold
2S01Hospital£32,439.68£29,195.71S02
3S02Office£7,420.00£6,678.00
4S03Office£6,128.42£5,515.58
5S04Retail£3,216.42£2,894.78
6S05Retail£3,771.49£3,394.34

Formula: =XLOOKUP(E2,A2:A6,C2:C6,"Not found")

Result for this sample: £7,420.00

Business operations

Moon Energy’s operations team is reviewing site electricity readings and a comparison consumption budget.

Return the actual for the chosen site code.

XLOOKUP business operations sample cells
RowABCDE
1Site codeSite typeElectricity kWhBudgetSelection / threshold
2S01Hospital143695129325.5S02
3S02Office3200028800
4S03Office2623423610.6
5S04Retail1323411910.6
6S05Retail1571214140.8

Formula: =XLOOKUP(E2,A2:A6,C2:C6,"Not found")

Result for this sample: 32,000

Abstract

Moon Energy’s orbital stations hold photon-cell reserves. Their controller compares current reserves with planned reserves.

Return the actual for the chosen site code.

XLOOKUP abstract sample cells
RowABCDE
1Station codeStation classPhoton cellsBudgetSelection / threshold
2S01Hospital1450013050S02
3S02Office32002880
4S03Office26002340
5S04Retail13001170
6S05Retail16001440

Formula: =XLOOKUP(E2,A2:A6,C2:C6,"Not found")

Result for this sample: 3,200

Experiment in Formula Lab

Open XLOOKUP in the interactive Formula Lab →

The practice engine supports a focused subset of Excel behavior. Lookups are exact-match only; it does not support all Excel functions, dates, arrays or workbook imports. Read the limits shown in Formula Lab before interpreting a result.

Browse all function guides · Back to Excel Toolkit

Book a free consultation

Free consultation

Start with a conversation.

Tell us a little about the reporting process. We will use this information only to respond to your enquiry.

This is optional and helps us understand the scale of the work; it is entirely at your discretion.

By sending this enquiry, you ask Excel Analytics to contact you about your request. Please do not include confidential data or files in this form.