Reopening #503 as requested. The attachment contains a formula using a union argument which is working fine at least in my Excel365 (but has been working with previous versions of Excel as well; union arguments can be used wherever ranges are allowed).
rank.xlsx