max number of non-empty consecutive cells

mendee525

New Member
Joined
Dec 3, 2020
Messages
1
Office Version
  1. 2010
Platform
  1. Windows
Dear all,
How i can find max number of non-empty consecutive cells in a row?

ABCDEFGK
107:55:24
17:04:47
08:01:57
17:21:42
07:58:30
17:10:32
07:48:49
17:40:45
07:55:51
17:29:54
17:58:13
Result 4
208:32:14
20:00:54
07:36:35
20:18:17
07:35:05
20:00:05
07:35:05
20:00:05
08:41:17Result 3
 

Some videos you may like

Excel Facts

Can you AutoAverage in Excel?
There is a drop-down next to the AutoSum symbol. Open the drop-down to choose AVERAGE, COUNT, MAX, or MIN

jasonb75

Well-known Member
Joined
Dec 30, 2008
Messages
11,986
Office Version
  1. 365
Platform
  1. Windows
This will do it.
Book1 (version 1).xlsb
ABCDEFGHI
107:55:2408:01:5707:58:3007:48:4907:55:5117:58:134
208:32:1407:36:3507:35:0507:35:0508:41:173
Sheet6
Cell Formulas
RangeFormula
I1:I2I1=MAX(FREQUENCY(IF(A1:H1<>"",COLUMN(A1:H1)),IF(A1:H1="",COLUMN(A1:H1))))
Press CTRL+SHIFT+ENTER to enter array formulas.

It is preferable if you use XL2BB to post any examples to the forum, formatting is often corrupted when you use copy and paste.
 

Watch MrExcel Video

Forum statistics

Threads
1,123,355
Messages
5,601,142
Members
414,431
Latest member
JustmemyselfandI

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
Top