Thread: Subtotaling
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Paul C Paul C is offline
external usenet poster
 
Posts: 269
Default Subtotaling


A B
1 =IF(AND(A1=1,A2<1),1,"")
1 =IF(AND(A2=1,A3<1),COUNTIF($A$1:$A2,1)-SUM($B$1:$B1),"")
2 =IF(AND(A3=1,A4<1),COUNTIF($A$1:$A3,1)-SUM($B$1:$B2),"")
5 =IF(AND(A4=1,A5<1),COUNTIF($A$1:$A4,1)-SUM($B$1:$B3),"")
6 =IF(AND(A5=1,A6<1),COUNTIF($A$1:$A5,1)-SUM($B$1:$B4),"")
7 =IF(AND(A6=1,A7<1),COUNTIF($A$1:$A6,1)-SUM($B$1:$B5),"")
1 =IF(AND(A7=1,A8<1),COUNTIF($A$1:$A7,1)-SUM($B$1:$B6),"")
1 =IF(AND(A8=1,A9<1),COUNTIF($A$1:$A8,1)-SUM($B$1:$B7),"")
1 =IF(AND(A9=1,A10<1),COUNTIF($A$1:$A9,1)-SUM($B$1:$B8),"")
1 =IF(AND(A10=1,A11<1),COUNTIF($A$1:$A10,1)-SUM($B$1:$B9),"")
1 =IF(AND(A11=1,A12<1),COUNTIF($A$1:$A11,1)-SUM($B$1:$B10),"")
1 =IF(AND(A12=1,A13<1),COUNTIF($A$1:$A12,1)-SUM($B$1:$B11),"")
5 =IF(AND(A13=1,A14<1),COUNTIF($A$1:$A13,1)-SUM($B$1:$B12),"")
6 =IF(AND(A14=1,A15<1),COUNTIF($A$1:$A14,1)-SUM($B$1:$B13),"")
7 =IF(AND(A15=1,A16<1),COUNTIF($A$1:$A15,1)-SUM($B$1:$B14),"")
6 =IF(AND(A16=1,A17<1),COUNTIF($A$1:$A16,1)-SUM($B$1:$B15),"")
5 =IF(AND(A17=1,A18<1),COUNTIF($A$1:$A17,1)-SUM($B$1:$B16),"")
1 =IF(AND(A18=1,A19<1),COUNTIF($A$1:$A18,1)-SUM($B$1:$B17),"")

B1 is a unique formula being the first cell. The formula in B2 can be
copied down.
-- .
If this helps, please remember to click yes.


"Katie" wrote:

I need a formula to subtotal each set of 1's in a column, without subtotaling
other numbers in the column.
example shown below.

1 )
1 ) subtotal = 2
2 ]
5 ]
6 ]
7 ] no subtotal
1 )
1 )
1 )
1 )
1 )
1 ) subtotal = 6
5 ]
6 ]
7 ]
6 ]
5 ] no subtotal
1 ) subtotal = 1