Lookup & Reference
Look up a table row and transpose it into a vertical summary card (HSTACK + TRANSPOSE)
Build a clean 2-column Field | Value inspector card from a wide horizontal table by pairing XLOOKUP, TRANSPOSE, and HSTACK.
Turn wide 20-column database rows into readable vertical executive cards!
Wide tables force users to scroll sideways across columns to inspect one deal or employee. An executive "Deal Inspector Card" stacks Field Names down Column 1 and the selected record's Values down Column 2!
XLOOKUP(F2,A2:A4,A2:D4) returns a matching row from this three-record source. Transpose the four headers and four returned values, then join them with HSTACK to produce a 4-by-2 card. The selected ID must exist exactly once; a missing ID raises a lookup error and a duplicate ID otherwise returns the first match.
| Card Row | Col 1: TRANSPOSE(A1:D1) | Col 2: TRANSPOSE(XLOOKUP("D-204", ...)) |
|---|---|---|
| Row 1 | DealID | D-204 |
| Row 2 | Account | Northwind Bio |
| Row 3 | Owner | Omar Vance |
| Row 4 | ARR | 84000 |
Spill a 2-column vertical Field | Value inspector card
F2 selects the deal. Leave four rows by two columns clear for the spilled result. This card is a view of the same source, not a privacy or access boundary. Extend all source ranges together when adding records or fields.
=HSTACK(TRANSPOSE(A1:D1),TRANSPOSE(XLOOKUP(F2,A2:A4,A2:D4)))Verify vertical card dimensions (N fields × 2 columns)
ROWS equals the number of columns in the source table (4), and COLUMNS equals 2.
=ROWS(HSTACK(TRANSPOSE(A1:D1), TRANSPOSE(XLOOKUP(F2, A2:A4, A2:D4))))Try the example
Use the original values or change them to test your understanding.