This is kind of hard to explain so I'll just use a small example...
A B C D E F
1 1 2 3 4 5 6
2 1 1 8 6 4 2
I know it didn't come out right but imagine the A,B,C,D,E,F is shifted over one column so the A is above the unbolded 1 and F is over the 6.
So, if I set a threshold value=10, I want to sum backwards from F2, E2...etc until it exceeds 10. Then return the previous index (row 1).
In this example, it would sum F2, E2, D2=12>10...so return the index in E1=5 which corresponds to a sum of 6 which is less than 10.
Is there a way to do this?
A B C D E F
1 1 2 3 4 5 6
2 1 1 8 6 4 2
I know it didn't come out right but imagine the A,B,C,D,E,F is shifted over one column so the A is above the unbolded 1 and F is over the 6.
So, if I set a threshold value=10, I want to sum backwards from F2, E2...etc until it exceeds 10. Then return the previous index (row 1).
In this example, it would sum F2, E2, D2=12>10...so return the index in E1=5 which corresponds to a sum of 6 which is less than 10.
Is there a way to do this?