HOW-TO 059 · Microsoft Excel and Google Sheets Basics

How to use XLOOKUP to retrieve information

Staff IDs must be matched to a separate reference table. Follow these steps to get a first version and make sure it is suitable for your purpose.

Before you start

FILE OPTIONAL: your Excel sheet. If you have it, select + or the paperclip, choose Upload file and wait until its name appears. Otherwise start a new chat and describe what you need. Never upload confidential material to an unapproved tool.

YOUR READY-TO-USE PROMPT

Copy this into your AI tool

Can you guide me as I try to use XLOOKUP to retrieve information. I am a beginner, so explain unfamiliar terms in plain English. Start by asking short questions, one by one, and pause after each answer. Find out the lookup key, the source table, the return field, and the missing-value rule. If there is a file, first confirm you can read it and ask for any missing information. When you have enough details, complete the task this way: Provide an Excel XLOOKUP formula using the lookup key we discuss to find the return field we discuss in the source table I share. Return 'Not found' if there is no match according to the missing-value rule we discuss. Explain exact matching, fixed ranges and an INDEX/MATCH alternative for older Excel. Use only what I provide or sources you can actually verify. Do not make up facts, figures, names or approvals. If you cannot create the requested file or perform a tool action, tell me exactly how to complete that part myself. Let me check the first version and make changes before we finish. If you can make the .xlsx file, provide it; otherwise show exact Excel cell references and formulas I can copy.
Paste it into an AI application and answer its questions.
Example, follow-up prompt and final checks

Example conversation

AI might ask: What should I know about lookup key?

You might reply: I can describe it here.

Example result

=XLOOKUP(A2,Staff!A:A,Staff!C:C,"Not found").

Improve your result

If an .xlsx file is available, download it and open it in Excel. Otherwise follow the cell-by-cell instructions.

Show how to detect duplicate lookup keys before trusting results.

Before you use it

Check a small sample of IDs against the source table.