IF function with 3 consecutive condition

Researchstudent

New Member
Joined
Jan 11, 2021
Messages
4
Office Version
  1. 2016
Platform
  1. Windows
Hello,

I need to write a formula to determine whether an event took place or not. Definition of event is at least 3 consecutive column cells with a value lower than 65. I would like to determine this for a certain period of time, for example in the coming 5 minutes. Every cell represents 20 seconds, so for 5 minutes I will be looking at 15 cells. The question is: are there 3 consecutive values lower than 65 within the 15 cells? If yes, give 1 (event), if no give 0 (no event) . It can also be more than 3 consecutive cells, but it should be at least 3 consecutive values

If I write IF(A1:A15<65;"1";"0") then I am not including the at least 3 consecutive condition. How can I do this?

Here is an example of what my data look like, and I manually added 1 to indicate that the formula should give a 1 in this case

1610373659199.png
 

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.

Forum statistics

Threads
1,214,833
Messages
6,121,864
Members
449,052
Latest member
Fuddy_Duddy

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