Counting consecutive values that appear a set number of times. CountIf?

tminogue

New Member
Joined
Apr 13, 2015
Messages
3
Hi Guys,

Hope you can help! If you guys could help me with this I would be hugely grateful as this would save me sooo much time every month.

Basically, I want to count the number of times 1 appears in 3 or more consecutive cells. Each cell only contains a 1 or 0.

[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]Name
[/TD]
[TD]Apr 1st
[/TD]
[TD]Apr 2nd
[/TD]
[TD]Apr 3rd
[/TD]
[TD]Apr 4th
[/TD]
[TD]Apr 5th
[/TD]
[TD]Apr 6th
[/TD]
[TD]Apr 7th
[/TD]
[TD]Apr 8th
[/TD]
[TD]Apr 9th
[/TD]
[TD]Apr 10th
[/TD]
[TD]Apr 11th
[/TD]
[TD]Apr 12th
[/TD]
[TD]total
[/TD]
[/TR]
[TR]
[TD]Joe Bloggs
[/TD]
[TD][/TD]
[TD][/TD]
[TD]1
[/TD]
[TD]1
[/TD]
[TD]1
[/TD]
[TD][/TD]
[TD][/TD]
[TD]1
[/TD]
[TD]1
[/TD]
[TD]1
[/TD]
[TD]1
[/TD]
[TD][/TD]
[TD]2
[/TD]
[/TR]
[TR]
[TD]Jim Bloggs
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]1
[/TD]
[TD]1
[/TD]
[TD][/TD]
[TD]1
[/TD]
[TD]1
[/TD]
[TD]1
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]1
[/TD]
[/TR]
</tbody>[/TABLE]

In the example above Joe blogs would return a value of 2 and Jim would return a value of 1


Any Help would be greatly appreciated!

T
 

Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"

Book1
ABCDEFGHIJKLMN
1NameApr 1stApr 2ndApr 3rdApr 4thApr 5thApr 6thApr 7thApr 8thApr 9thApr 10thApr 11thApr 12thtotal
2Joe Bloggs11111112
3Jim Bloggs111111
Sheet1
Cell Formulas
RangeFormula
N2{=SUMPRODUCT(--(FREQUENCY(IF($B2:$M2=1,COLUMN($B2:$M2)),IF($B2:$M2<>1,COLUMN($B2:$M2)))>=3))}
Press CTRL+SHIFT+ENTER to enter array formulas.


WBD
 
Upvote 0

Forum statistics

Threads
1,223,164
Messages
6,170,444
Members
452,326
Latest member
johnshaji

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