0Pricing
Excel Formulas Academy · Lesson

Returning Whole Rows or Columns

Spill multiple results from a single XLOOKUP.

More Than One Answer

So far XLOOKUP has returned a single value. But it can also return a whole row or column of data at once.

When a formula returns many values, they spill into the neighboring cells automatically. This lets one XLOOKUP fill an entire mini-record.

=XLOOKUP(D2, A2:A20, B2:E20)

Widening the Return Array

The trick is to make the return array span several columns. Instead of returning just B2:B20, return B2:E20.

XLOOKUP finds the matching row, then hands back every column in that row of the return array. One formula, four results.

=XLOOKUP(D2, A2:A20, B2:E20)

All lessons in this course

  1. The XLOOKUP Syntax
  2. Handling Misses With if_not_found
  3. Searching Left and From the Bottom
  4. Returning Whole Rows or Columns
← Back to Excel Formulas Academy