formula for criterium to count if value is given at least twice in 10 sequential cells

FemkeBles

New Member
Joined
Jul 21, 2021
Messages
3
Office Version
  1. 365
Platform
  1. Windows
Hi,

i'm struggeling with quite a complex issue (for me at least haha). I've a column with words 'wheel' and 'interval'. I want to count the number of times 'interval' is present in the column, but only if in 10 subsequential cells 'interval' is present 2 times. So not count interval in the case of "wheel-wheel-wheel-wheel-wheel-interval-wheel-wheel-wheel-wheel', but counting it in the case of 'wheel-interval-wheel-wheel-wheel-wheel-wheel-interval-wheel-wheel', as i need a threshold of when counting interval (It is about revolutions of a running wheel with mice, so one revolution does not count as 'activity', whereas two revolutions in a short time period do).

I really hope this makes a little bit sense and that somebody can help me!

Kind regards,
Femke
 

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK
The logic is lost on me why an interval is connected with a revolution but it's irelevant :)
Your data should start below row 9. let's say first cell is A10.
Then you can find if the value in A10 is present in the 9 cells above or the 9 below using:
Excel Formula:
=COUNTIF(OFFSET($A10,-9,0,19,1),$A10)>1
Or you can use this one to only get TRUE/FALSE in case ther is interval:
Excel Formula:
=IF($A10="interval",COUNTIF(OFFSET($A10,-9,0,19,1),$A10)>1,"")
 
Upvote 0

Forum statistics

Threads
1,215,220
Messages
6,123,698
Members
449,117
Latest member
Aaagu

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