View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.misc
JB2010 JB2010 is offline
external usenet poster
 
Posts: 44
Default sum until criteria not met

hi there


i am looking for some amendment to a SUMIF or SUMPRODUCT.

i have a table of that shows data in columns going down in rows in the order
of a product hierarchy, like this;

A B
1 Product #
-----------------------------
2 All Products 250
3 Cars 100
4 Car A 50
5 Car B 30
6 Car C 20
7 Trucks 150
8 Truck A 90
9 Truck B 35
10 Truck C 25

there are three levels to the hierarchy; top (All Products), middle (Cars /
Trucks) & bottom (A/B/C). the bottom level is inputted data, the middle level
should be a subtotal of the bottom level & the top level should be a total of
the middle level.

i am looking for a formula i can put in a third column that will check the
totals & subtotals at top & middle levels of the hierarchy.

I order to do this, i presume i will need to tell the function to look down
the rows for sequential items of a similar level & sum the range up to the
point where the next row is of a different level. the problem is, i dont know
how to do this!?!?

Any one got any ideas?

I have tried to simplify this from the actual problem, but if i have been
unclear or you need any more info, please do not hesitate to let me know

many thanks

jb