XLOOKUP for Ticket Data — Replace VLOOKUP for Good

Source: Excel M9 · XLOOKUP for Ticket Data — Replace VLOOKUP for Good · Click Less, Script More

If you still use VLOOKUP for helpdesk data, you know the pain: the lookup column has to be on the left, counting columns is easy to get wrong, and one inserted column breaks the whole sheet. XLOOKUP fixes all of that. In this post you will use it on a 1,000-ticket dataset, so you can find any ticket in seconds — without scrolling, filtering, or counting columns.

The problem

A helpdesk workbook with 1,000 tickets is useful only if you can find the ticket you need. With VLOOKUP, that means remembering which column holds the status, which holds the owner, and which holds the priority — and hoping nobody inserts a column in the middle. VLOOKUP also only looks to the right, so if the answer you want sits to the left of the ticket ID, you have to rearrange the sheet or build a workaround.

That is fragile. A report that breaks when a column moves is not a report you can trust, and in a busy helpdesk, a wrong lookup can mean the wrong ticket gets updated, closed, or escalated.

The slow way

The slow way is to use filters, scroll through 1,000 rows, or use VLOOKUP with a hard-coded column number. You type the formula, count across to the column you want, and hope you counted correctly. When the sheet changes, you recount. When a ticket ID is missing, VLOOKUP returns an ugly #N/A that tells you nothing about what went wrong.

It works, just barely — until the dataset grows, the columns move, or someone else has to use your workbook and cannot tell what your formula is doing.

The fast way

XLOOKUP takes three simple parts: what you are looking for, where to look for it, and what to return. No column numbers, no left-to-right restriction, and a friendly message when a ticket is not found.

Step 1 — Look up a ticket’s status. Find the ticket ID in cell A2, look it up in the Tickets sheet, and return the status:

=XLOOKUP(A2, Tickets!A:A, Tickets!C:C)

Step 2 — Look to the left. XLOOKUP does not care which side the answer is on. Look up a value in column D and return the matching value from column B:

=XLOOKUP(A2, Tickets!D:D, Tickets!B:B)

Step 3 — Show a helpful message when a ticket is missing. Instead of #N/A, tell the user exactly what to check:

=XLOOKUP(A2, Tickets!A:A, Tickets!C:C, "Not found — check the ticket ID")

Step 4 — Return several columns at once. Return a whole range of ticket details in one formula, instead of writing a separate lookup for each column:

=XLOOKUP(A2, Tickets!A:A, Tickets!C:E)

Copy each formula down your list of ticket IDs, and the whole 1,000-ticket dataset becomes searchable from one small lookup table.

What you should see

Each formula should return the matching ticket details straight away — the right status, owner, or priority for the ticket ID in A2. If you type a ticket ID that is not in the dataset, the third formula should show “Not found — check the ticket ID” instead of an error. The fourth formula should spill across several columns, filling in the ticket’s details in one go. If a result looks wrong, check that the lookup range and the return range start on the same row.

If it fails

If you see #N/A even with the friendly message, check for a typo or an extra space in the ticket ID — ticket IDs must match exactly. If a formula returns the wrong ticket, make sure your lookup range is the ID column, not the status column. If XLOOKUP is not available, your version of Excel may be too old; XLOOKUP needs a modern version of Microsoft 365 or Excel 2021 or later. If the spill formula shows #SPILL!, clear the cells it needs to spill into — something is blocking them.

Tools used

Microsoft Excel — a 1,000-ticket helpdesk dataset, with the ticket IDs, status, owner, and priority on a sheet named Tickets. No add-ins and no affiliate link are needed for this post.

Watch the Excel playlist: https://www.youtube.com/playlist?list=PLX2Ef6skh4R0

Next step

Open your own ticket workbook, pick the lookup you use most often, and rewrite it as an XLOOKUP using the formulas above. Then try the “Not found” version, and delete one VLOOKUP you no longer need. Once you have done that, you will not want to count columns again — and your workbook will survive the next column that someone inserts.

Lab demo · sample data. Test in a lab first.