# Attendance counter using "countif" and "arrayformula"

**URL:** <https://community.glideapps.com/t/attendance-counter-using-countif-and-arrayformula/3147>\
**Category:** Ask for Help\
**Created:** [December 27, 2019, 12:12am UTC](https://community.glideapps.com/t/attendance-counter-using-countif-and-arrayformula/3147 "2019-12-27T00:12:02Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![carlaltdelete](https://avatars.discourse-cdn.com/v4/letter/c/f08c70/32.png) [@carlaltdelete](https://community.glideapps.com/u/carlaltdelete)\
**Post date:** [December 27, 2019, 12:12am UTC](https://community.glideapps.com/t/attendance-counter-using-countif-and-arrayformula/3147/1 "2019-12-27T00:12:02Z")

</div>

I want to count the amount of registrations for events in my registration log. I cannot use a simple countif like in the screenshot, because for every new registration the formula is not yet in the cell since the app uses the first empty row. Moreover, my formula in the screenshot is not correct because the reach is not correctly using all registrations in the whole column.  
From other posts I understand ARRAYFORMULA should be of help, but I can’t get it to work for me. Your help would be great!

 ![Screenshot 2019-12-27 at 00.33.53](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/2X/d/d6ddf19bf1260b725d4ff3b33b7af67cab16c494.png)

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [December 27, 2019, 12:55am UTC](https://community.glideapps.com/t/attendance-counter-using-countif-and-arrayformula/3147/2 "2019-12-27T00:55:17Z")

</div>

Hi, if I understand it correctly, each new registration initiates a new row with information for column A, B, C but what you’re trying to count here is only for column A.

For this problem, I suggest using QUERY. The example can be seen [here](https://docs.google.com/spreadsheets/d/1sEQHpSKyHx9w2F_Xx3lm56SU1p-8eI81OYU5TYvQFvw/edit?folder=1D2ypOSaY5_bk426Z1MxXjoOUOhPMIGXq#gid=0).

A screenshot:

 ![](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/2X/1/15866582e0cf5fc63d08f7f0960f8e77f7b2ae44.png)

For column A, I randomly generated the event IDs.

For column C & D, I used QUERY, taking all the unique event IDs (without taking blank cells into account) and count the number of registrations.

Please reply if you need further assistance or I understood the problem incorrectly.

---

<div class="post-metadata">

**Author:** ![carlaltdelete](https://avatars.discourse-cdn.com/v4/letter/c/f08c70/32.png) [@carlaltdelete](https://community.glideapps.com/u/carlaltdelete)\
**Post date:** [December 27, 2019, 10:12am UTC](https://community.glideapps.com/t/attendance-counter-using-countif-and-arrayformula/3147/3 "2019-12-27T10:12:38Z")

</div>

Thanks ThinhDinh! This is what I need. Actually it is better than what I asked for. I can move on now 🙂

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [December 27, 2019, 11:24am UTC](https://community.glideapps.com/t/attendance-counter-using-countif-and-arrayformula/3147/4 "2019-12-27T11:24:49Z")

</div>

Just send me a message if you need further assistance, enjoy your holidays!
