LinkedIn Post by:
John Jairo V.
Hi to all!
One option could be:
=LET(c,B2:B10,v,c+ROW(c)%,p,XMATCH(v,SORT(v)),FILTER(A2:A10,MMULT((TOROW(p)<=p)*TOROW(c),p^0)<=150))
Blessings!
Hi to all!
One option could be:
=LET(c,B2:B10,v,c+ROW(c)%,p,XMATCH(v,SORT(v)),FILTER(A2:A10,MMULT((TOROW(p)<=p)*TOROW(c),p^0)<=150))
Blessings!
Thank you Excel BI.
=LET(a, SORT(HSTACK(A2:B10,SEQUENCE(COUNT(B2:B10))),2), INDEX(SORT(FILTER(a, SCAN(0,INDEX(a,,2),LAMBDA(x,y,x+y))<150),3),,1))
Thank you Excel BI.
=LET(a, SORT(HSTACK(A2:B10,SEQUENCE(COUNT(B2:B10))),2), INDEX(SORT(FILTER(a, SCAN(0,INDEX(a,,2),LAMBDA(x,y,x+y))<150),3),,1))
=LET(r,A2:A10,s,SORT(HSTACK(r,SEQUENCE(ROWS(r)),B2:B10),3),TAKE(SORT(FILTER(s,SCAN(,TAKE(s,,-1),LAMBDA(a,x,a+x))<151),2),,1))
=LET(
d, SORT(A2:B10, 2),
v, MAKEARRAY(ROWS(d), 1, LAMBDA(r,c, IF(SUM(TAKE(d, r)) <= 150, INDEX(d, r, 1), x))),
TOCOL(SORTBY(v, XMATCH(v, A2:A10)), 2)
)
Hola, envio mi soluccion.
=LET(a;SI(B2:B10<=PROMEDIO(B2:B10)+1; A2:A10;""); FILTRAR(a;a<>""))
=LET(z,A2:A10,c,B2:B10,f,FILTER(SORTBY(z,c),SCAN(,SORT(c),LAMBDA(a,v,a+v))<=150),SORTBY(f,XMATCH(f,z)))
=LET(c,B2:B10,d,c+ROW(c)%,FILTER(A2:A10,d<=SMALL(d,XMATCH(150,SCAN(,SORT(c),LAMBDA(a,v,a+v)),-1))))
=LET(m,A2:B10,p,SORT(HSTACK(m,SEQUENCE(ROWS(m))),2),TAKE(SORT(FILTER(p,SCAN(0,INDEX(p,0,2),LAMBDA(i,j,i+j))<=150),3),,1))
=LET(_tbl,HSTACK(SEQUENCE(ROWS(A2:A10))&A2:A10,B2:B10),
_tblsort,SORT(_tbl,2,),_rtot,SCAN(0,DROP(_tblsort,,1),LAMBDA(a,v,a+v)),
MID(SORT(TOCOL(TAKE(IFS(_rtot<=150,_tblsort),,1),3)),2,100))
=TOCOL(IF(XMATCH(A2:A10,FILTER(TAKE(SORT(A2:B10,2),,1),SCAN(0,SORT(B2:B10),LAMBDA(a,d,a+d))<151)),A2:A10),2)
=LET(_range,A2:B10,_limit,150,_sortedlist,SORT(_range,2,1),_cumulativecosts,SCAN(0,TAKE(_sortedlist,,-1),LAMBDA(_start,_costs,_start+_costs)),_countcosts,COUNT(FILTER(_cumulativecosts,_cumulativecosts<=_limit)),TAKE(_sortedlist,_countcosts,1))
One way could be
=LET(a,A2:A10,b,B2:B10,c,SCAN(,SORT(b,1,1),LAMBDA(x,y,x+y)),FILTER(a,XLOOKUP(a,SORTBY(a,b,1),c)<=150))