This should deal with VSTACK:
Code:
=LET(rws,($D$2:$D$97=$D2)*($G$2:$G$97=$G2),TAKE(SORT(CHOOSE({1;2},VALUE(TEXTSPLIT(TEXTJOIN("¬",TRUE,FILTER($N$2:$O$97,rws)),"¬")),VALUE(TEXTSPLIT(TEXTJOIN("¬",TRUE,FILTER($Z$2:$AA$97,rws)),"¬"))),2,-1,TRUE),1))
can you show a screenshot of the formula with
_xlfn in it?
if
LET is OK then
rws should be too (it's only a variable).