Function Problems

How to Sum Values for Repeated Text Matches in Excel

Camila MilosovichCamila Milosovich Oct 14, 2026 872 views

Question details

The user needs to calculate an overall total by searching a large table for repeated subject names and summing their corresponding values.

How to Sum Values for Repeated Text Matches in Excel
Product
Excel
Device & OS
not provided
Scenario
Calculating overall progress from a data table containing multiple entries for the same subject.
Observed behavior
Matching a specific text string across a designated range and returning the total sum of adjacent numerical values.
Before you start

Ensure your source data range is consistent and that the text you want to match has no hidden trailing spaces, as this can cause the formula to miss matches.

Solution 1Recommended

Use the SUMIF Function to Sum Matching Values

The SUMIF function is the most efficient method to add up values based on a single text criteria, such as repeated subject names.

The SUMIF formula evaluates a specified range of cells, searches for a criteria you define, and then sums the values in a corresponding range.

1
Select the target cell

Click on the cell where you want the total sum to be displayed (for example, P9).

2
Enter the SUMIF formula

Type the formula =SUMIF($B$6:$L$400,O9,$C$6:$M$400). In this formula, $B$6:$L$400 is the range being searched, O9 contains the text to match, and $C$6:$M$400 is the range of values to sum.

3
Apply absolute references

Ensure you use dollar signs ($) to lock the search and sum ranges. This prevents the range from shifting when you copy the formula down to other rows.

4
Fill the formula down

Press Enter to calculate the result, then drag the fill handle down to apply the calculation to other repeated text matches.

Use the SUMIF Function to Sum Matching Values
Dynamic Range Adjustment: If your data extends beyond row 400, simply change the row number in the formula to encompass all of your data before dragging it down.
Smart Spreadsheet Solution

Calculate Data Faster with WPS Spreadsheet

WPS Spreadsheet fully supports the SUMIF function and provides an intuitive interface for managing large datasets. Easily sum up repeated text values and track overall progress without lag.

  1. 1. Open your data in WPS: Launch WPS Spreadsheet and open your workbook containing the data.
  2. 2. Use the Formula tab: Navigate to the Formula tab on the top ribbon and click 'Insert Function'.
  3. 3. Search for SUMIF: Type 'SUMIF' into the search box, select it from the list, and click OK.
  4. 4. Input the arguments: Enter your Range, Criteria, and Sum_range in the dialog box prompts, then click OK to calculate.
Fully compatible with Microsoft Excel formats (.xlsx), ensuring seamless operation of SUMIF and other formulas.Built-in function wizard to help you construct and troubleshoot condition-based summation easily.Lightweight and fast, effortlessly handling large data ranges across thousands of rows.
QA img-9

Frequently Asked Questions

What is the difference between SUMIF and SUMIFS?

SUMIF is used when you need to sum values based on a single condition, such as matching one subject name. SUMIFS allows you to sum values based on multiple conditions across different ranges.

Why is my SUMIF formula returning a 0?

This usually happens if the text in your criteria doesn't exactly match the text in the searched range. Check for typos, hidden characters, or trailing spaces in your cells. Using the TRIM function can help clean your text data.

Can I use partial text matches in a SUMIF formula?

Yes, you can use wildcards. For example, using "*Math*" as your criteria will sum all values where the text contains the word 'Math', regardless of what comes before or after it.

Do the range and sum_range need to be the same size?

Yes, for the SUMIF function to calculate correctly and prevent unexpected results, the criteria range and the sum range must be exactly the same size and shape.