group counting

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Here is the challenge

The columns represent the hours in the day (1 to 24 hours) and the rows represent each day (day 1, day 2, up to 365) of the year. The idea is to count the number of GROUPS of numbers for each day that are greater than 0. Remember, you are counting groups of numbers that are greater than 0 and not individual numbers that are greater than 0. For example, for day 1, the total number of groups of numbers that are greater than 0 is 6. These are between the parentheses

1 2 3 4 5 6 7 8 9 10 ..
1 0 (10 20) 0 0 (10 10 10) 0 (10
2 20 0 0 0 20 30 30 30 0
3 10 30 40 0 10 20 30 0 10 1

Any help would be appreciate
 
I'm confused. It looks to me like you have 6 *individual* numbers that
are greater than 0, and three *groups* of numbers > 0...

If there are 6 *groups*, what's the difference between a group and an
individual number?
 
My mistake...

The first row (day one) has 3 groups of numbers greater than 0, not 6.
 
Hi Erik
try the following (if your data is in column A:H)
=SUMPRODUCT((A1:G1=0)*(B1:H1<>0))+(A1<>0)

Note the different starting columns for both ranges
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top