Sifting through massive, disorganized financial ledgers to locate specific transactions is a common, time-consuming struggle for analysts. While standard funding sources-such as venture capital, institutional grants, or departmental budgets-are easily categorized, inconsistent transaction descriptions often obscure key data. Utilizing a wildcard text match formula grants immediate, dynamic visibility into these fragmented entries.
Stipulation: This approach requires nesting the SEARCH and ISNUMBER functions within the FILTER formula to prevent calculation errors on non-matching rows. For example, filtering for "Corp*" or "*Grant" allows you to isolate specific portfolios instantly.
The following guide details the exact formula syntax to automate your financial data analysis.
Financial analysts, accountants, and controllers frequently deal with raw, unstructured transactional data exported from ERP systems, bank portals, and credit card statements. These transaction logs are notorious for having messy, inconsistent descriptions. For instance, a subscription charge might appear as "MSFT *12345 BILLING", "MICROSOFT REDMOND", or "MSFT CORP". When preparing monthly reconciliations, cash-flow categorizations, or departmental expense audits, you need a dynamic, scalable way to filter these records using wildcard text matches.
In modern Excel (Excel 365 and Excel 2021+), the introduction of dynamic arrays revolutionized data manipulation. While the built-in FILTER function is incredibly powerful, it does not natively support standard wildcard characters like * (asterisk) or ? (question mark) when evaluating logical arrays directly. Fortunately, by combining the FILTER function with helper functions like SEARCH (or FIND) and ISNUMBER, we can construct robust formulas that filter financial data using precise wildcard text matches.
In standard Excel toolsets like Find and Replace or Advanced Filter, typing *AMZN* will easily surface any cell containing the letters "AMZN". However, if you write a formula like this:
=FILTER(A2:D100, B2:B100 = "*AMZN*", "No matches")
Excel will look for the literal string "*AMZN*" rather than treating the asterisks as wildcards. This results in an empty array or the "No matches" error value.
To overcome this limitation, we must construct a formula that evaluates whether a substring exists within our target text range, returning a logical array of TRUE or FALSE values. The perfect combination for this task is: FILTER + ISNUMBER + SEARCH.
To dynamically extract transactions containing a specific keyword, use the following formula structure:
=FILTER(data_range, ISNUMBER(SEARCH("keyword", criteria_range)), "No matches found")
SEARCH("keyword", criteria_range): The SEARCH function scans each cell in your specified criteria range (e.g., the Description column) for your target keyword. If it finds the keyword, it returns its starting character position as a number (e.g., 1, 5, 12). If it does not find the keyword, it returns a #VALUE! error. Crucially, SEARCH is case-insensitive.ISNUMBER(...): This function evaluates the output of the SEARCH step. Any successfully located keyword (which returned a number) is converted to TRUE. Any failed matches (which returned a #VALUE! error) are converted to FALSE. This produces the exact logical boolean array that the FILTER function requires.FILTER(..., ..., "No matches found"): The FILTER function reads the array of TRUE and FALSE values, extracting only the rows that correspond to TRUE. If no rows match, it gracefully returns the fallback string: "No matches found".Let's look at a concrete example. Suppose you have a table of corporate credit card transactions spanning range A2:D8:
| Date (Col A) | Transaction Description (Col B) | Category (Col C) | Amount (Col D) |
|---|---|---|---|
| 2023-10-01 | AMZN MKTP US*1A2B3 | Office Supplies | -$142.50 |
| 2023-10-02 | ADOBE *CREATIVE CLOUD | Software / SaaS | -$54.99 |
| 2023-10-02 | UBER TRIP *HELP.UBER | Travel & Entertainment | -$32.40 |
| 2023-10-03 | AMZN WEB SERVICES AWS | Hosting Infrastructure | -$890.00 |
| 2023-10-04 | MICROSOFT *365 BILL | Software / SaaS | -$12.50 |
| 2023-10-05 | WHOLEFOODS MARKET INC | Meals & Entertainment | -$85.20 |
| 2023-10-05 | AMZN Retail Support | Office Supplies | -$19.99 |
If you want to isolate and review all Amazon-related expenses (including AWS and Marketplace purchases) to perform an IT vs. Office Supply reclassification, you can write the following formula in an empty cell:
=FILTER(A2:D8, ISNUMBER(SEARCH("AMZN", B2:B8)), "No Amazon Transactions")
When calculated, Excel will immediately output a dynamic, spilled array containing only the three Amazon rows:
| 2023-10-01 | AMZN MKTP US*1A2B3 | Office Supplies | -$142.50 |
| 2023-10-03 | AMZN WEB SERVICES AWS | Hosting Infrastructure | -$890.00 |
| 2023-10-05 | AMZN Retail Support | Office Supplies | -$19.99 |
Often, you need to filter data using multiple potential wildcard matches simultaneously. For example, you may want to extract all software-related costs, which could include transactions matching "ADOBE" or "MICROSOFT".
In Excel dynamic array formulas, addition (+) acts as the logical OR operator. To execute an OR wildcard search, construct your formula like this:
=FILTER(A2:D8, ISNUMBER(SEARCH("ADOBE", B2:B8)) + ISNUMBER(SEARCH("MICROSOFT", B2:B8)), "No software matches")
How this evaluates:
TRUE (1) + FALSE (0) = 1 (Included)FALSE (0) + TRUE (1) = 1 (Included)FALSE (0) + FALSE (0) = 0 (Excluded)Hardcoding your search terms into formulas is bad practice for financial modeling. It is much more efficient to build an interactive dashboard where users can type keywords into dedicated input cells.
Assume cell F1 is your designated search input box. You can reference it in your formula:
=FILTER(A2:D8, ISNUMBER(SEARCH(F1, B2:B8)), "No matching transactions")
Pro-Tip: Handling Empty Search Input Cells
If cell F1 is left completely blank, the SEARCH function treats the blank cell as an empty string, matches it against every row, and returns the entire database. If you want Excel to return nothing (or a clean blank) when the search box is empty, wrap the formula in an IF statement:
=IF(F1="", "Please enter a search term", FILTER(A2:D8, ISNUMBER(SEARCH(F1, B2:B8)), "No matches"))
By default, using SEARCH makes your wildcard matches case-insensitive. Searching for "amzn" will match "AMZN", "Amzn", and "amzn".
If you are dealing with strict cost-coding where casing identifies different legal entities or accounts (e.g., "CorpA" vs. "corpa"), swap SEARCH for the FIND function. The FIND function works identically but enforces strict case sensitivity:
=FILTER(A2:D8, ISNUMBER(FIND("AMZN", B2:B8)), "No Match")
If you or your stakeholders are still using older desktop versions of Excel (such as Excel 2016 or 2019) that do not support dynamic array spills or the FILTER function, you can achieve similar results using a helper column combined with the COUNTIF function (which natively supports true wildcard characters).
B2 and your search term is in $F$1, enter this formula in the helper column:
=COUNTIF(B2, "*" & $F$1 & "*")
1 if the wildcard match is found and 0 if it is not.Dynamically filtering financial data based on partial text matches is an essential skill for managing chaotic general ledger databases. By utilizing the FILTER, ISNUMBER, and SEARCH combination, you avoid manual data entry, streamline monthly reconciliations, and build future-proof financial dashboards that automatically update as new raw data is appended. Incorporate these formulas into your templates to transition from manual data sanitization to high-impact financial analysis.
Disclaimer:
The documents and templates provided on this page are for informational and illustrative purposes only. They do not constitute professional, legal, or financial advice, and should not be relied upon as such. Because individual circumstances and regulatory requirements vary, these materials may not be suitable for your specific needs. We recommend consulting with a qualified professional before adapting or using any of these examples for official or commercial purposes.