Formula for counting consecutive cells by column

gruntingmonkey

Active Member
Joined
Mar 6, 2008
Messages
444
Office Version
  1. 365
Platform
  1. Windows
Hello, I'm looking to find the formula to calculate if a range of cells, by row, are consecutively completed more than 5 times. IE, if 5 columns are completed next to each other regardless of where that string is in the range, then it is true, if it is less that 5 for the range, then it is false.

I'm looking to get the formula for sell P2 in the picture below.
1723123576376.png


Thanks in advance for reviewing.
 

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.
Do you mean something like this:

Excel Formula:
=MAX(SCAN(0,A2:O2,LAMBDA(a,b,IF(ISTEXT(b),a+1,0))))>=5
 
Upvote 0
Solution
Follow up question to this: Instead of coming back with True/False is their a way to count the max cells that are filled in?
 
Upvote 0
If you mean the max consecutive chain then just:

Excel Formula:
=MAX(SCAN(0,A2:O2,LAMBDA(a,b,IF(ISTEXT(b),a+1,0))))
 
Upvote 0
Another question.. Is there a way of returning the last column ref? IE Z or 26

Also, If there are more than 2 groups of consecutive cells filled in, will it just return the largest? Is there a way to show multiples. IE Z,AK,AY or 26,37,51
 
Upvote 0
Another question.. Is there a way of returning the last column ref? IE Z or 26

Also, If there are more than 2 groups of consecutive cells filled in, will it just return the largest? Is there a way to show multiples. IE Z,AK,AY or 26,37,51
is this what you need?
工作簿1.xlsx
ABCDEFGHIJKLMNOPQRSTUV
1Time1Time2Time3Time4Time5Time6Time7Time8Time9Time10Time11Time12Time13Time14Time15Time16Time17Time18Time19Time20Time21
2m1m2m3m4m5m1m2m1m1m2m3m4m5m6
3
46
519
6
7
8
9
Sheet1
Cell Formulas
RangeFormula
E4:E5E4=TOCOL(DROP(GROUPBY(TOCOL(SCAN(0,A2:U2,LAMBDA(x,y,x+(y=0)))),TOCOL((A2:U2>0)*COLUMN(A1:U1)),LAMBDA(x,MAX(x)/(COUNT(0/x)>4)),,0),,1),3)
Dynamic array formulas.
 
Upvote 0
I'm getting a #Name error on that.

I would also need it run along one row rather than down a column.
 
Upvote 0
maybe groupby is not available in your office version.
=TOrow(DROP(GROUPBY(TOCOL(SCAN(0,A2:U2,LAMBDA(x,y,x+(y=0)))),TOCOL((A2:U2>0)*COLUMN(A1:U1)),LAMBDA(x,MAX(x)/(COUNT(0/x)>4)),,0),,1),3)
 
Upvote 0

Forum statistics

Threads
1,223,708
Messages
6,174,006
Members
452,542
Latest member
Bricklin

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