I'm trying to find an alternative to my formula that calculates the running count of multiple values in a range.
It's returning the correct results, but the issue is it uses the volatile function OFFSET()
, which I would like to avoid.
Here is the formula:
=SCAN(0,A2:A13,
LAMBDA(a,b,
IF(OFFSET(b,-1,0)=b,
a+1,1)
)
)
I have tried using INDEX()
and ROW()
, but I cannot replicate what OFFSET()
does.
How can I alter the formula?