View Single Post
  #11   Report Post  
Domenic
 
Posts: n/a
Default

Try...

=IF(COUNTIF(A2:A8,"33"),SUM(INDEX(B2:B8,LARGE(IF( A2:A833,ROW(A2:A8)-ROW
(A2)+1),1)):B8),SUM(B2:B8))

....confirmed with CONTROL+SHIFT+ENTER.

Hope this helps!

In article ,
Robert wrote:

Okay, Nice work Domenic

The formula is almost doing what I need it to do, but, if there
is not a number larger than 33 in any of the A cells ex. A8:A2, Excel
is giving me an error #N/A. If there is not a number larger than 33, I
need all the corresponding cells calculated together. Also I changed
the formula to start looking from A8:A2 instead of A2:A8, I meant to
put them down the right way in my previous post.
No Biggie, I changed that.

(For Cell C8)
Example "If A8 is Greater than 33, I need for it to sum only B8"
Example "If A7 is Greater than 33, I need for it to sum B7:B8"
Example "If A6 is Greater than 33, I need for it to sum B6:B8"
Example "If A5 is Greater than 33, I need for it to sum B5:B8"
Example "If A4 is Greater than 33, I need for it to sum B4:B8"
Example "If A3 is Greater than 33, I need for it to sum B3:B8"
Example "If A2 is Greater than 33, I need for it to sum B2:B8."

=SUM(INDEX(B8:B2,MATCH(TRUE,A8:A233,0)):B8)

One more thing I did notice, when it finds the very first A cell with
a number larger than 33, I need for excel to go no further than that
line for the calculations, I noticed that if there are more than one
cell in A8:A1 with a 34, it calculates from the very last one. In
other words, If A5 and A3 both have a value greater than 33, I need
for the formula to stop at A5 and calculate only from C5:C8.

Thanks so much for your help so far, I would never have gotten this
far. Thankyou ! Robert