how to count the number of cells it takes to reach a certain sum

O

Oshtruck user

I have a row of data and it contains numerical values. What I want to be able
to do is put a 1 above one of the values and the cell above the one will
count how many cells back it takes for the sum of the values to get a certain
value.

Ex I want to count how many cells it takes to get to over a sum of 300.

A B C D E F G H I J K
1 8
2 1
3 25 40 55 35 40 60 55 20 15 50 40

since 40+50+15+20+55+60+40+35=315 it takes 8 cells to get over a value of 315

Any help will be great.
 
D

Domenic

I'm not sure how the number 1 comes into play, but see if the following
helps...

=MATCH(TRUE,SUBTOTAL(9,OFFSET(A3:K3,,COLUMNS(A3:K3)-1,,-(COLUMN(A3:K3)-CO
LUMN(A3)+1)))>=315,0)

....confirmed with CONTROL+SHIFT+ENTER, not just ENTER.

Hope this helps!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top