If you encounter merged cells in Excel, be warned: the sheet can become very difficult to work with. For example, VLOOKUP and INDEX + MATCH may no longer work. If you can’t remove the merged cells, what can you do?
=LOOKUP("座",INDIRECT("a2:a"&MATCH(D2,$B$1:$B$11,))) - MATCH(D2,$B$1:$B$11,) finds the position of "Peter" in column B and returns 9.
- INDIRECT("a2:a"&MATCH(D2,$B$1:$B$11,)): returns the referenced cell range, resulting in INDIRECT("a1:a"&9), i.e. the a1:a9 range.
- LOOKUP("座", a1:a9) returns the last text value in the referenced range. In this formula it returns the last text in a1:a9, which is C.















