Fix Excel SUMIF with a Cell Reference and Wildcard
Question details
The user needs a SUMIF formula that uses a cell reference and a wildcard to match invoice descriptions beginning with specified text.

- 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.
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.
Combine the Cell Reference and Wildcard in SUMIF
Use this formula to sum amounts for descriptions that start with the text in N13.
Click the cell where you want the invoice total to appear.
Type =SUMIF($H$2:$H$1000,N13&"*",$J$2:$J$1000) and press Enter.
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.
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. Open the workbook: Open WPS Spreadsheets, select Open, and choose the invoice workbook.
- 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. Enter the formula: Select an empty result cell, enter =SUMIF($H$2:$H$1000,N13&"*",$J$2:$J$1000), and press Enter.
- 4. Adjust the ranges: If needed, edit the formula to include all invoice rows, keeping the description and amount ranges aligned.

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.




