AkelaWolf76
New Member
- Joined
- Aug 15, 2023
- Messages
- 14
- Office Version
- 365
- Platform
- Windows
if I am looking to return on qty "13" the values of 12-15 would need to based on the value of where 13 landsHello, what is supposed to happen when there is remainder - e.g. the target quantity is 13 but the running totals are 12 - 15?
=LET(
n,A3,
q,A5:A17,
v,B5:B17,
a,MAKEARRAY(ROWS(q),MAX(q),LAMBDA(r,c,IF(c<=CHOOSEROWS(q,r),CHOOSEROWS(v,r),NA()))),
SUM(TAKE(TOCOL(a,2),n)))
That has worked perfectly. Many thanksHello again, many thanks for the clarification. Please test the following:
Excel Formula:=LET( n,A3, q,A5:A17, v,B5:B17, a,MAKEARRAY(ROWS(q),MAX(q),LAMBDA(r,c,IF(c<=CHOOSEROWS(q,r),CHOOSEROWS(v,r),NA()))), SUM(TAKE(TOCOL(a,2),n)))