How to check two consecutive occurrences

Hi there,

Does anybody know if there is a way to count the number of consecutive occurrences in a column?

As it is not so easy to explain exactly what I want with words, here's an example.


I am an English teacher and I have a group with three students.

I have created a table to control their attendance.

I would like a formula to inform me every time each student misses two classes in a roll.


Here's my table... Can somebody help me to accomplish that in the "Two Consecutive Absences" table? ...Thanks.

User uploaded file

Mac mini (Late 2012), iOS 12.0.1, null

Posted on Oct 23, 2018 1:35 PM

Reply
4 replies

Oct 23, 2018 3:16 PM in response to JMAURICIOENGLISH

JMAURICIOENGLISH wrote:



I thought there would be a single formula for the "Two Consecutive Absences table"... something like...

=countifs((attendance:control::B);"Absent")...


There are single formula approaches in Excel, using "array formulas". But Numbers doesn't support those. So I think in Numbers the only way is to have "counter" columns or similar.


SG

Oct 23, 2018 2:37 PM in response to SGIII

Thanks for your quick response, SG.


I tried something similar to your suggestion. Mine was a bit longer than yours, but it also did the trick.


I thought there would be a single formula for the "Two Consecutive Absences table"... something like...

=countifs((attendance:control::B);"Absent")... but with something else to sum only the consecutive occurrences.


Again... your way helped me to reduce the amount of formulas, columns and rows I had created to accomplish the task.


Thank you very much.

João

Oct 23, 2018 2:37 PM in response to JMAURICIOENGLISH

One way is to add an "counter" column for each student in the Attendance Control table, and then hide those columns if you want.



User uploaded file


The formula in E2 filled right and down:


=IF(AND(B1="ABSENT",B2="ABSENT"),1,"")


The formula in A1 of the second table, filled right:


=SUM(ATTENDANCE CONTROL::E)


Make sure you don't have any $ anchors in the formulas.


Replace the , with ; in the formulas if your region uses , as a decimal separator.


SG

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

How to check two consecutive occurrences

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.