Function Problems

Fix Excel SUMIF with a Cell Reference and Wildcard

Elise WilliamsElise Williams Nov 14, 2026 870 views

Question details

The user needs a SUMIF formula that uses a cell reference and a wildcard to match invoice descriptions beginning with specified text.

Fix Excel SUMIF with a Cell Reference and Wildcard
Product
Microsoft Excel
Device & OS
not provided
Scenario
Sum invoice amounts in column J when their descriptions in column H begin with the text in cell N13.
Observed behavior
The SUMIF formula returns zero when the cell reference is combined with a wildcard.
Before you start

Check that column H contains the invoice descriptions, column J contains numeric amounts, and N13 contains the prefix to match. Adjust the row limits in the formula to cover your data.

Solution 1Recommended

Combine the Cell Reference and Wildcard in SUMIF

Use this formula to sum amounts for descriptions that start with the text in N13.

1
Select the result cell

Click the cell where you want the invoice total to appear.

2
Enter the SUMIF formula

Type =SUMIF($H$2:$H$1000,N13&"*",$J$2:$J$1000) and press Enter.

3
Check the ranges and result

Compare the result with the descriptions in H2:H1000 and amounts in J2:J1000. If your data extends beyond row 1000, update both ranges to cover the same rows.

How the wildcard works: The ampersand joins the value in N13 to "*", which matches any characters after that text. The dollar signs keep the specified ranges fixed if you copy the formula.
WPS Spreadsheets

Sum Invoice Descriptions by Prefix in WPS Spreadsheets

Use the same SUMIF formula in WPS Spreadsheets to match invoice descriptions that begin with text in a reference cell and total their amounts.

  1. 1. Open the workbook: Open WPS Spreadsheets, select Open, and choose the invoice workbook.
  2. 2. Check the source cells: Confirm that descriptions are in column H, numeric amounts are in column J, and the text prefix is in N13.
  3. 3. Enter the formula: Select an empty result cell, enter =SUMIF($H$2:$H$1000,N13&"*",$J$2:$J$1000), and press Enter.
  4. 4. Adjust the ranges: If needed, edit the formula to include all invoice rows, keeping the description and amount ranges aligned.
Match description prefixes with a cell reference and wildcardOpen and edit Microsoft Excel XLSX and XLS filesWork with familiar spreadsheet formulas and rangesUse WPS Office for free
microsoft office alternative - wps office

Frequently Asked Questions

Why does SUMIF need an ampersand before the wildcard?

The ampersand joins the value in N13 with "*" to create a criterion such as invoice*. Without that join, the cell reference and wildcard are not combined into the intended criterion.

How do I match text anywhere in a description?

Place a wildcard on both sides of the reference: =SUMIF($H$2:$H$1000,"*"&N13&"*",$J$2:$J$1000). This matches descriptions containing the text in N13 anywhere.

What should I check if the formula still returns zero?

Check that N13 contains the expected prefix, the descriptions start with that text, and the amounts in column J are numbers rather than text. Also make sure both ranges cover the same invoice rows.

What happens if N13 is empty?

The criterion becomes "*", which can match text descriptions broadly. Enter a prefix in N13 before relying on the result.