View Single Post
  #8   Report Post  
Posted to microsoft.public.excel.programming
Jason[_30_] Jason[_30_] is offline
external usenet poster
 
Posts: 8
Default Counting groups of similar items

I'll have another shot at explaining my scenario - hopefully as
clearly and concisely as possible this time...

Below is the example data set; each letter is in a separate column:

A A A B B B B B A A A A A A A A C C C C...ZCA ZCA ZCA

What I would like to have is a popup when I click on any cell in a
group telling me how long that group is.

So the result for the row above would tell me that the first group of
A is 3 long, the group of B is 5 long, the second group of A is 8
long, the group of C is 4 long, the group of ZKV is 3 long.

I'd even settle for being able to get row below that tells me how long
each group is (as per my examples in other messages in this thread).

I hope someone can get his or her head around this... :)




(Jason) wrote in message . com...
I'm having no luck with the array formula - Entering it in C2 gives a
circular reference error. Not fully understanding how it works I'm
not having a lot of luck correcting it, and when I do get something
that almost resembles working it doesn't like non-numeric data...

JWolf wrote in message . ..
Use the array formula:

=MAX(--(A1:IV1=C1)*(A2:IV2))

enter in cell C2 and hit ctrl+shift+enter

enter a ,b, c, etc. in C1 and the maximum run length is calculated for
that letter.