0

In Google Sheets, I have an array formula with countif that counts attendance based on week number. But for some reason on the 52nd week of the year, it counts all the blank cells. The answer in the cell should be 0 since we do not have school that week, but instead it is in the thousands. I assume it is counting blank cells for some reason.

Can anyone fix my formula so it doesn't go wacky on the 52nd week every year? See cell R3 for formula and R10 for miscalculation on spreadsheet linked below. My formula:

=arrayformula(if(len(P3:P),countif(weeknum($E3:E,21),O3:O20),""))

Link to spreadsheet:
https://docs.google.com/spreadsheets/d/1jvTkohGw9c-nDnjv_ZpGCHLTNJbfE2d0FwzZjjTurbw/edit?usp=sharing

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.