Best on desktop
The spreadsheet workspace needs more room than this screen offers. Switch to a laptop for the full experience.
You're an HR analyst building a chain-of-command report for a small org chart. Columns A–B contain 8 employees with their direct manager (Alice is CEO — empty manager).
Your task — using VLOOKUP or XLOOKUP only (no PowerQuery, no PATH function):
(none)).(none).Important: plain IFERROR(VLOOKUP(...), "(none)") is not enough. Alice's manager cell (B2) is blank, not missing — so VLOOKUP("Alice", ...) finds her row and returns an empty string. No error, IFERROR doesn't fire, and the cell shows up empty. You need to also test for the empty return — e.g., wrap with LET: =LET(m, XLOOKUP(<prev>, $A$2:$A$9, $B$2:$B$9, ""), IF(m="", "(none)", m)). The "" 4th arg to XLOOKUP handles "key not found" (when an upstream level already returned "(none)") and the IF handles "key found but cell is blank" (the CEO row).
The org tree:
Alice (CEO)
├── Bob
│ ├── Dan ── Grace
│ └── Eve ── Henry
└── Carol
└── Frank
Graded cells: C2 (L1 of Alice → "(none)" — CEO boundary), C8 (L1 of Grace → Dan), D8 (L2 of Grace → Bob), E8 (L3 of Grace → Alice), C9 (L1 of Henry → Eve), D2 (L2 of Alice → "(none)"), E9 (L3 of Henry → Alice).