Forum Discussion
colee365
Jun 14, 2023Copper Contributor
+/- Student Grade Formula Question
Good afternoon, I work in a secondary school and we use the following grades: 1-, 1, 1+, 2-, 2, 2+, etc. I need to calculate the number of students that got a 1- etc in each subject. Obviously the +...
mathetes
Jun 14, 2023Gold Contributor
As others have pointed out, you have to format the cells containing the grades as text. If (alternatively) your grades had been A, A+, A-, B+, B, B-, etc., you would have had no problem. But making them "numbers" when you're not actually dealing with them as numbers for calculation (you are using numbers, yes, for their ordinal values)...that's why the addition of text to a number "obviously" mixes types. So make them all text, and then COUNTIF works, as does the Pivot Table. See the attached.
SergeiBaklan
Jun 14, 2023Diamond Contributor
IMHO, COUNTIFS() works great with mix of texts and numbers. It automatically considers as numbers texts which looks like as numbers.
Same for PivotTable if use data model. Cached PivotTable takes "1" and 1 as different values.
In attached.