View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
keepITcool keepITcool is offline
external usenet poster
 
Posts: 2,253
Default How to set up a sub-total routine?

is this an idea?

starting in f2:
=SUMPRODUCT(N(A1:E1=A2:E2))=5
copy it down.

then use Data/Subtotals on the range
and use col6 as ID.

off the cuff. you may need to adapt.
I use sumproduct() so there's NO need for 'array formula entry'
I use n() to force boolean to integer conversion.



keepITcool

< email : keepitcool chello nl (with @ and .)
< homepage: http://members.chello.nl/keepitcool


"Ed" wrote:

Not sure if this needs to be VBA or a formula, or even if there's a
built-in function, so I'll start here and let someone drop-kick me in
the right direction.



I've got six columns of information. I need to sub-total as long as
the information in all six columns stays the same; as soon as one item
in one column changes, I start counting at 1 again and sub-total. For
instance:







My first thought is to build a string consisting of all the text
values in the first row, drop a row and build a similar string, and
compare. If they match, increment my count. If they don't match, set
my current count aas the sub-total, take the dis-similar row as the
new starting point, and begin comparing again. Is there an easier and
better way?



Ed