Count Max Number of successive Data in Multiple Rows/Columns

scowie

New Member
Joined
Jun 6, 2016
Messages
3
Hello,

I am having issues calculating the maximum number of successive data in an array. I do have the formula for calculating the max number of successive data in a single row.

However, my issue is I want to use that formula and apply it to rows below row 2 and beyond and have it return the maximum number of successive data including all of the rows.

Here is an example if my explanation was unclear:
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="align: center"]MAX DATA IN SUCCESSION[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]1[/TD]
[TD]1[/TD]
[TD][/TD]
[TD]1[/TD]
[TD]1[/TD]
[TD="align: center"]3[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]1[/TD]
[TD]1[/TD]
[TD][/TD]
[TD]1[/TD]
[TD][/TD]
[TD="align: center"]2[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]1[/TD]
[TD]1[/TD]
[TD]1[/TD]
[TD]1[/TD]
[TD][/TD]
[TD="align: center"]5[/TD]
[/TR]
</tbody>[/TABLE]

So the formula for calculating the max data in succession for row 2, for example, would be:

=(MAX(FREQUENCY(IF(A2:F2<>"",COLUMN(A2:F2)),IF(A2:F2="",COLUMN(A2:F2))))

From this, I would like to combine the formulas into one and have the formula consider all data (A2:F4) and return the max number of successive data (which would be 5).

Thanks for your help!!
 

Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.

Forum statistics

Threads
1,223,228
Messages
6,170,876
Members
452,363
Latest member
merico17

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