I have an excel file like this:
could anyone help me to find the first cell (from left to right) so that cumulative sum >=0
Formula in C6
:
=XLOOKUP(TRUE,SCAN(0,C2:J2,LAMBDA(a,b,a b))>=0,C2:J2,"No value >= 0")
CodePudding user response:
Or prior Excel versions:
=INDEX(C1:J1,MATCH(TRUE,(MMULT(--(COLUMN(C1:J1)<=TRANSPOSE(COLUMN(C1:J1))),TRANSPOSE(C1:J1)))>=0,0))
(May require entered with ctrl shift enter
)