Count Checked (True) Values
Using my sample data see link to sheet
// Basic formula
=byrow(range,lambda(r,countif(r,"=true")))
=byrow(C4:G24,lambda(r,countif(r,"=true")))
Rather than hard coding the range, or alternatively iterating over all the rows and columns, I added some formulas to calculate the size of the data range.
Last Row
// calculate last row (last name)
=MATCH("zzzz",A:A)
=24 // last_row
Last Column
I'm sure someone can pare this down. I used XMATCH and looked for location of the last "true" value and the last "false" value, then used MAX to take the largest of the two to determine the last checkbox in the row.
FYI row 4, range(A4:4) is the first data row in my sample table.
// Calculate last column (checkboxes) of data
=max(XMATCH(true,A4:4,,-1),XMATCH(false,A4:4,,-1))
=MAX(7,2)
=7 // last_column ('G')
Convert the column # to a letter
// Use ADDRESS to get A1 Notation
=ADDRESS(row, column, [absolute_relative_mode])
=ADDRESS(4,7,4)
=G4
// Remove row and keep last_column letter
=SUBSTITUTE(text_to_search, search_for, replace_with, [occurrence_number])
=SUBSTITUTE("G4", "4", "")
=G
Create the range
// use INDIRECT to build range
=INDIRECT(cell_reference_as_string, [is_A1_notation])
=INDIRECT("C4:" &last_column &last_row)
=INDIRECT("C4:"&"G"&"24")
="C4:G24"
Combine it all
This allows the range to be dynamic based on the number of columns you create and number of rows of people you add.
// Broken out for ease of reading.
=byrow(INDIRECT("C4:"
&SUBSTITUTE(
ADDRESS(4,max(XMATCH(true,A4:4,,-1),
XMATCH(false,A4:4,,-1))),"4","")
&MATCH("zzzz",A:A)),
lambda(r,countif(r,"=true")))
// One liner
=byrow(INDIRECT("C4:"&SUBSTITUTE(ADDRESS(4,max(XMATCH(true,A4:4,,-1),XMATCH(false,A4:4,,-1))),"4","")&MATCH("zzzz",A:A)),lambda(r,countif(r,"=true")))
See it in action, Sample Google Sheet
I have attached a sample spreadsheet so you can see how it works:Google Sheet with Sample Data and Formulas