What You Will Learn
You will learn how to ask Gemini to generate and explain lookup formulas that bring client, product, or supplier details into a transaction table using XLOOKUP, INDEX/MATCH, or similar formulas.
Required Dataset
Create a blank Google Sheet with three tabs:
Transactions
Supplier_Master
Lookup_Check
In Transactions, create sample columns:
PO Number
Supplier ID
Item Description
Spend
Supplier Name
Supplier Category
Risk Rating
In Supplier_Master, create:
Supplier ID
Supplier Name
Supplier Category
Risk Rating
Add 5–10 sample supplier records and a few matching transaction rows.
Before You Start
Make sure Supplier ID appears in both tabs and uses the same format. Lookup formulas work best when the lookup key is clean, unique, and consistent.
Step-by-Step Instructions
Step 1. Ask Gemini for an XLOOKUP formula
Open Gemini and enter:
Act as a Google Sheets formula coach.
Business question: Bring Supplier Name into the Transactions tab using Supplier ID.
Data context:
– Transactions Supplier ID is in column B
– Supplier_Master Supplier ID is in column A
– Supplier_Master Supplier Name is in column B
– Supplier Name should go in Transactions column E
Return:
- XLOOKUP formula for row 2
- Plain-English explanation
- What happens if no match is found
- Manual validation step
Expected formula:
=XLOOKUP(B2,Supplier_Master!A:A,Supplier_Master!B:B,”Unmapped”)
Step 2. Create additional lookup columns
Ask Gemini for formulas to bring in Supplier Category and Risk Rating.
Expected patterns:
=XLOOKUP(B2,Supplier_Master!A:A,Supplier_Master!C:C,”Unmapped”)
=XLOOKUP(B2,Supplier_Master!A:A,Supplier_Master!D:D,”Unmapped”)
Copy the formulas down.
Step 3. Ask for an INDEX/MATCH alternative
Ask Gemini:
Show the equivalent INDEX/MATCH formula for bringing Supplier Name into Transactions using Supplier ID. Explain when INDEX/MATCH may be useful.
Expected formula:
=IFERROR(INDEX(Supplier_Master!B:B,MATCH(B2,Supplier_Master!A:A,0)),”Unmapped”)
Expected Result
Your Transactions tab should now show supplier name, category, and risk rating based on Supplier ID.
Check Your Work
Confirm that matched suppliers return the correct values, unmatched suppliers show Unmapped, and no formula references the wrong column. Spot-check several Supplier IDs manually against Supplier_Master.
Optional Extension
Ask Gemini:
Review my lookup formulas and identify risks such as duplicate Supplier IDs, extra spaces, missing matches, wrong columns, or inconsistent ID formats.
