Are there any tricks that could get me from table 1 to table 2. I don't see a solution at this time. Is it doable?
This formula will lookup the Name column for "Class A name"
and "Class B name"
, and return the data between...
"Class A name"
and"Class B name"
,"Class B name"
and end of data.
=LAMBDA(SOURCE,A,B,HEADERS,
LAMBDA(NAME,TYPE,NR,
LAMBDA(INDEXA,INDEXB,INDEXE,
LAMBDA(DATAA,DATAB,
{HEADERS;DATAA;DATAB}
)(FILTER(SOURCE,ROW(NAME)>INDEXA,ROW(NAME)<INDEXB),
FILTER(SOURCE,ROW(NAME)>INDEXB,ROW(NAME)<INDEXE))
)(XMATCH(A,NAME),XMATCH(B,NAME),COUNTA(NAME) 1)
)(INDEX(SOURCE,,1),INDEX(SOURCE,,2),INDEX(SOURCE,,3))
)(A1:C7,"Class A name","Class B name",{"Class name","Group name","Nr students group"})