I want to calculate the average grade score of each pupil using an array formula and without the use of helper columns. If all grade are numbers its simple enough to average those, but when letter grades are introduced into the mix I need to convert these to their number values using the lookup table and then average the whole row for each pupil.
So far I was able to take one row and convert all grades that are letters to their corresponding values using the formula below.
I then thought, great I got numbers in place of the letter grades, lets just “average” this result like so:
which gives #N/A, which I do not understand when the following is completely allowed:
One way to solve the case is to add all numerical grades to the 2 column Grade table you have in column M and N (technically it is not using helper columns?), then sort the
Grade column in ascending order as shown below:
Then you can use the following array formula to find the average grade in cell
Being an array formula, you MUST press Ctrl+Shift+Enter upon finishing the formula in the formula bar otherwise it will not function correctly. Then you can simply drag the formula down to apply across.
The logic is to use LOOKUP function to return the corresponding attainment for each given grade regardless if it is an actual number or a letter.
Let me know if you have any questions. Cheers 🙂
Using VLOOKUPs seems like it would be much simpler:
If you can tolerate changing “A*” to say “A+” (or something else that doesn’t get interpreted as a wildcard) this may get you going:
SUM sums the numeric grades; the
SUMPRODUCT(SUMIF(...)) sums the letter grades. Then divide the total by the number of grades (
Hope that helps