Today’s function is SUM_BETWEEN_POSITION. Sums the values between a start and end, based on a two-way lookup.
,LAMBDA(values,vCategory,hCategory,vStart,hStart,vEnd,hEnd=
LET(
position,TOCOL(MAKEARRAY(ROWS(values),COLUMNS(values),LAMBDA(r,c,r&"-"&c))),
startPosition,XMATCH(vStart,vCategory)&"-"&XMATCH(hStart,hCategory),
endPosition,XMATCH(vEnd,vCategory)&"-"&XMATCH(hEnd,hCategory), match,SUM((position>=startPosition)*(position<=endPosition)*TOCOL(values)),
match))
ليست هناك تعليقات:
إرسال تعليق