← Back to all guides
Technology · 2 min READ

How to Return Multiple Columns With XLOOKUP in Excel

How to Return Multiple Columns With XLOOKUP in Excel guide illustration

Enter one order ID and get the customer name and shipping status side by side. Test missing orders and fix a blocked result without losing existing data.

Quick note

Follow these steps at your own pace. Check product terms and prices directly with providers before purchasing.

Quick answer

In Excel for Microsoft 365, Excel 2024 or Excel 2021, enter =XLOOKUP(E2,A2:A4,B2:C4,"No order") in F2. Excel finds the order number in column A and returns the matching name and status in F2 and G2. Leave both output cells free before you begin.

1. Build a small order list

In a blank worksheet, type Order, Customer and Status across A1:C1. Enter the three records below in rows 2 through 4. Keep the order numbers unique for this test. In E1:G1, type Find order, Customer and Status. Leave column D blank so you can see where the original list ends.

OrderCustomerStatus
A17RosaPacked
A18MinaSent
A19TheoNew

2. Look up one field first

Type A18 in E2 as an order code. In F2 enter =XLOOKUP(E2,A2:A4,B2:B4,"No order"). The result should be Mina. The first range tells Excel where to find the code. The second tells it which value to bring back from the same row. An exact match is the default, so there is no need to sort the order numbers.

3. Expand the result to two columns

Edit F2 and change the return range from B2:B4 to B2:C4. The complete formula is =XLOOKUP(E2,A2:A4,B2:C4,"No order"). Press Enter once. You should see Mina in F2 and Sent in G2. Excel calls this spreading of results into neighboring cells a spill. Edit the formula in F2 whenever you need to change both outputs.

4. Try a different order and a missing code

Change E2 to A17. Both results should switch to Rosa and Packed. Now try A99. You should see No order in F2 and the previous status should disappear. If a real order returns the wrong shipment, check for repeated IDs. By default, XLOOKUP returns the first match it finds.

Why does F2 say #SPILL!?

Check whether G2 already contains a value or a formula that looks blank. Move anything you need to keep, or put the lookup in two clear, unmerged cells outside an Excel table. Excel 2016 and 2019 lack XLOOKUP, so check the version if the function name is unrecognized.

Microsoft Support · XLOOKUP function

SHARE THIS GUIDE

Know someone who could use this?

DISCUSSION

Comments

Read or join the discussion.