count 1 for 15 or more consecutive 1s

D4ND4N

New Member
Joined
Oct 1, 2014
Messages
5
Guys,

I have a column consisting of 1s and 0s/spaces. I want to count 1 for every 15 or more consecutive 1s. The result should be the number of times of consecutive fifteen or more 1s appearing on the list. What would the function be?

Please help me on this. TY.

Regards,
D4ND4N
 
For what it's worth, here's an updated version of my last post that will count more than 15 consecutive as 1 occurance.

=SUMPRODUCT(--(COUNTIF(OFFSET(A1,ROW(A1:A100)-1,0,15,1),1)=15),--(COUNTIF(OFFSET(A2,ROW(A1:A100)-1,0,15,1),1)<>15))

Non Array entered, though the use of OFFSET probably cancels out the benefit of being Non Array entered...

Probably.

Just for fun, we can abbreviate your solution to:

=SUMPRODUCT(0+(MMULT(0+(COUNTIF(OFFSET(OFFSET(A1,{0,1},,,),ROW(A1:A100)-1,0,15,1),1)-15=0),{3;5})=3))

Regards
 
Last edited:
Upvote 0

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.
So am I, just in a different area. I read the VBA language spec in my spare time. ;)
 
Upvote 0
Wow... Thank You Very Much to all of you Guys!!!! This site is sooo cooool!!!!! All I thought I am already good in excel but apparently I am not.. LOL.. From now onward I will be asking a lot of questions to you EXCEL MASTERS. haha. Please always help me.. Again THANK YOU GUYS...
 
Upvote 0

Forum statistics

Threads
1,214,385
Messages
6,119,210
Members
448,874
Latest member
b1step2far

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