Counting consecutive instances of highest value in a row

DG_Silva

New Member
Joined
Jun 18, 2018
Messages
1
I'm sorry in advanced if my explanation isn't very clear, but here goes!

I've got a grid of results from four teams who are scored on a weekly basis. So far, my calculation has the following which highlights how many times each team has won (listed at the top of each team):

Code:
=SUMPRODUCT(IF(A3:A58>0,(SUBTOTAL(4,OFFSET($A$3:$D$58,ROW($A$3:$D$58)-ROW(A$3),0,1))=A3:A58)+0))

(Not really relevant, but there you go...)

What I'm trying to do is to record the highest streak each team has had as the winner for the week. So the table looks something like this (the numbers refer to position, not score):

ABCD
1234
4321
1243
1324
4123
2134
2143

<tbody>
</tbody>

In theory, Team A should have 2 and Team B should have 3. The formula I have so far is:

Code:
=MAX(FREQUENCY(IF(A3:A53=MAX(A3:D53),ROW(A3:D53)),IF(A3:A53=0,ROW(A3:D53))))

However, I know this is wrong because it's only returning 1 and not 3. I can't use a definite value such as '1' because the values are below 0 (a percentage) and vary each time. Can anyone help with this please?
 

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.
A
B
C
D
1
ABCD
2
1​
2​
3​
4​
3
4​
3​
2​
1​
4
1​
2​
4​
3​
5
1​
3​
2​
4​
6
4​
1​
2​
3​
7
2​
1​
3​
4​
8
2​
1​
4​
3​
9
10
2​
3​
1​
1​
Sheet: Sheet23

Array formula in cell A10:
=SUM((IF(MIN($A$2:$D$8)=A2:A8,A2:A8,"A")=A3:A9)*1)+1

How to enter an array formula
1. Copy formula
2. Double click on cell A10
3. Paste formula
4. Press and hold CTRL + SHIFT
5. Press Enter
 
Upvote 0

Forum statistics

Threads
1,215,381
Messages
6,124,614
Members
449,175
Latest member
Anniewonder

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top