Find row containing maximum number of values

bkalma

New Member
Joined
Nov 10, 2016
Messages
11
I am trying to write an array formula that will return the row number for the row containing the maximum number of values in a set of data. For example, I would like the formula to return 3 for the following as row 3 contains the maximum number of data entries.

111
11
1111
1
111

<tbody>
</tbody>


I would also like this formula to work for any range.

The following (CTRL+SHIFT+ENTER) gives the maximum number of data points but not the row number:

=MAX(SUBTOTAL(2,OFFSET($A$1:$A$5,ROW($A$1:$E$5)-ROW($A$1:$A$5,0)))

Might be a good place to start.

Thanks!​



 

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.

Forum statistics

Threads
1,215,327
Messages
6,124,280
Members
449,149
Latest member
mwdbActuary

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