Forum Discussion
CrankyPants2382
Jul 25, 2023Copper Contributor
Return Date based on a sum of the total so far
Is there a formula that I could use that would return the date from a dataset based on a total so far for other conditions. A bit like a lookup but takes the sum so far into account. That's proba...
OliverScheurich
Jul 25, 2023Gold Contributor
=LET(data,FILTER(B1:J3,B1:J1=C13),
cnt,SCAN(0,TAKE(data,-1),LAMBDA(ini,arr,ini+arr)),
INDEX(CHOOSEROWS(data,2),XMATCH(C12,cnt,1)))
An alternative could be this formula if you work with Office 365 or Excel 2021. In cell C12 you can enter the number of apples and in cell C13 you can enter the weather condition.