google-sheetsgoogle-sheets-formulaspreadsheet

COUNTIF INDIRECT formula that always works now gets parsing error


I've been using this formula, relying on COUNTIF and INDIRECT, to tally attendance for several years with no problem, but with this class I get a parsing error and I can't see why.

Students register attendance using Google forms. The column with their student ID is always "C" on the Form Responses. Then I make a "Tally" sheet (tab), paste the entire list of enrolled students IDs in column "C," Make a list in column "A" of all the Form Responses sheets, then paste the COUNTIF/INDIRECT formula in the first cell of column "D." Ordinarily, this would work fine, and then I just have to drag down to apply the formula to each student ID. In the current class, there are 50 students. But here, when I input the formula in C1, I get a parsing error.

First, here is a copy of a sheet where it works fine. (Obviously, all identifying data has been deleted.) https://docs.google.com/spreadsheets/d/1VtpaD1f8lKZwk0C-EuOKq4MptB5VfeU_zB5sGapOpmE/edit?usp=sharing

Now here's the sheet that doesn't work. I can't see what I'm doing differently. https://docs.google.com/spreadsheets/d/1KOe3ObzuctuDtQ39sOqLm4iYdi8ddN6eCIYrRnChZYo/edit?usp=sharing

Any help would be greatly appreciated. Thanks in advance.

I did what I always do, which is adjust the formula I have saved to a memo to account for differences in the total number of enrolled students and the total number of times attendance would be counted. It always worked before, but now I get a parsing error.

EDIT: As Kreeszh pointed out, the final semicolon is extraneous! That's what was causing the parsing error. Also, JvdV suggested a much more efficient and sophisticated way to tally the attendance. Check it out in the replies below.


Solution

  • Get rid of the last semicolon ; before the curly brace } and that should solve the error!

    You're basically telling it there's another row in the array to look at, but not putting anything there.