Module 5 ยท Lesson 23
Wildcards in criteria
Use *, ?, and ~ to match variable text safely.
Wildcards in criteria: what Excel is actually doing
An asterisk matches any sequence of characters and a question mark matches one character. A tilde escapes a literal wildcard. Wildcards work inside text criteria such as "*late*".
Read this Wildcards in criteria example
Start with the business need: Total records whose reference starts with a recognised prefix. Read each argument, reference, field, or control in the example before copying it into a larger model.
=SUMIF(Code,"INV-*",Amount)Evidence that your Wildcards in criteria result is trustworthy
A conditional report should add back to a known total when its categories are mutually exclusive and complete.
- Explain how the result supports this task: Total records whose reference starts with a recognised prefix.
- Retain one known-result check and one boundary or exception check.
- Record the source, period, unit, and refresh assumption beside the output.
The Wildcards in criteria mistake to catch
Broad patterns can capture unintended words. For example, *east* can match both East and Northeast.
Your desk challenge for lesson 23
Write one criterion for codes beginning with AB and another for exactly five-character codes ending in 7.
- Separate the measure range from the criteria ranges.
- Make every criteria range the same size.
- Reconcile detailed results to an unconditional control total.
Key takeaway: Write one criterion for codes beginning with AB and another for exactly five-character codes ending in 7.