Skip to main content
← All guides

When a label contains an asterisk

Decide whether a symbol is a pattern or part of an exact label before writing criteria.

Original worked example
ProductAmount
P*10
Pine30
p*5

A visible label and a search pattern differ

The example contains the literal product label P* as well as Pine. A wildcard criterion P* can match both labels. If the business question asks for the exact product called P*, the asterisk must be escaped. Case-insensitive matching also includes p*, so the intended sum is 15.

Escape the wildcard, preserve the rule

A tilde before the asterisk makes it literal in a criteria string. To match a literal question mark, escape that symbol too; a literal tilde itself needs doubling. An explicit equality operator separates text equality from comparisons. The browser reporting proof uses direct EXACT comparisons for special labels to avoid an engine escape difference, while the formula below illustrates Excel criteria syntax.

=SUMIFS(B2:B4,A2:A4,"=P~*")

Include a counterexample

A dataset containing only P* would not expose an accidentally broad wildcard. Add Pine, a differently cased literal label and a nonmatching product. Keep this decision separate from trimming spaces: silently changing labels can merge records that the source system treats differently.

The guided criteria tasks deliberately accept a narrower input set and explain unsupported conditions. The reporting workshop uses its own literal-label policy, with formula proof available for the selected data.

Check the idea

Under case-insensitive exact-label matching, how much belongs to literal P*?

Try the idea

References

Examples and explanations are original. Source links describe the related Excel features; native Excel workbook testing is separate from browser learning checks.