Site icon ExcelNotes

How to Sum Numbers Ending an Exact Text String

You can use the SUMPRODUCT and EXACT functions to sum the cells that end with a case-sensitive text string.

Example: You are working with a worksheet with the first name in column A, the last name in column B, the grade in column C, and the marks in column D.

Question: What are the sum marks for students with last names ending case-sensitive "ms"?

=SUMPRODUCT(–EXACT("ms", RIGHT(B2:B10, LEN("ms"))),D2:D10)

The result returns 87. One student's last name ending with "ms": B5.

Explanation:

Exit mobile version