Site icon ExcelNotes

How to Sum Numbers with Length

You can combine the LEN and SUMPRODUCT functions to sum the number of cells with a certain length.

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 is the sum of the marks for students' last names with eight characters?

SUMPRODUCT(–(LEN(B2:B10)=8), D2:D10)

The result returns 263. Three students have last names with eight characters B5, B6, and B10.

Explanation:

Exit mobile version