How to Calculate Scores for Multiple Text Answers in One Excel Cell
Question details
The user needs to calculate a total score by comparing submitted text answers against a set of correct answers and adding up the corresponding scores for matches within a single cell.
- Product
- Excel / WPS Spreadsheet
- Device & OS
- not provided
- Scenario
- Grading assessments, tests, or surveys where multiple text-based responses must be matched to an answer key to compute a final tally.
- Observed behavior
- Requires an array-based formula that can evaluate matches between text responses and correct answers, and sum their respective point values simultaneously.
Ensure that your correct answers, submitted answers, and score values are organized in identically sized ranges or compatible dimensions to prevent formula calculation errors.
Use the SUMPRODUCT Function to Compare and Calculate Scores
The SUMPRODUCT function efficiently compares arrays (submitted answers vs. correct answers) and multiplies the boolean results by the corresponding scores to get a total in one go.
By multiplying the comparison array by the score array, Excel converts TRUE/FALSE statements into 1s and 0s. This means only matched answers will add their corresponding score to the total sum.
Ensure your data is laid out correctly. For example, place correct answers in B1:K3, submitted answers in B4:K4, and the respective score values in B5:K5.
Click on the blank cell where you want the final calculated total score to appear.
Type the formula =SUMPRODUCT((B4:K4=B1:K3)*B5:K5) into the formula bar. Replace the ranges if your data is located elsewhere in the worksheet.
Press the Enter key to calculate the result. The cell will now display the total score for all correct text answers.
Score and Grade Effortlessly with WPS Spreadsheet
WPS Spreadsheet fully supports advanced array functions like SUMPRODUCT, making it incredibly easy to grade tests, calculate survey scores, and handle complex data matching without needing multiple helper columns.
- 1. Open WPS Spreadsheet: Launch WPS Office and open your grading workbook or assessment file.
- 2. Input the SUMPRODUCT Formula: Select your target cell and enter =SUMPRODUCT((Submitted=Correct)*Scores), replacing the placeholders with your actual cell ranges.
- 3. Calculate and Save: Press Enter to view the total score instantly, then save your file seamlessly in the standard .xlsx format.

Frequently Asked Questions
Why does my SUMPRODUCT formula return a #VALUE! error?
This error typically occurs if the compared ranges (arrays) do not have the exact same dimensions, or if there is non-numeric text located inside the score range.
Can I use SUMPRODUCT with vertical columns instead of horizontal rows?
Yes, SUMPRODUCT works identically for columns. Just ensure your column ranges match exactly in size, such as =SUMPRODUCT((B2:B10=C2:C10)*D2:D10).
Is SUMPRODUCT case-sensitive when comparing text answers?
No, the standard equals operator (=) used inside the SUMPRODUCT function is not case-sensitive. It will treat "Apple" and "apple" as a correct match.
How do I make the grading formula case-sensitive?
To perform a strictly case-sensitive text comparison, you need to wrap the text arrays in the EXACT function. The modified formula would look like this: =SUMPRODUCT(EXACT(B4:K4, B1:K3)*B5:K5).




