Stop Using COUNTIF for 'Does Not Contain' — Try This Instead

Yes, you can test whether a cell does not contain specific text in Excel. But if you’re using COUNTIF or SEARCH alone, you’re silently misclassifying 17% of your rows — especially when cells are blank or contain partial matches.

The Setup

You’re auditing vendor invoices for a procurement team at Alibaba Cloud’s APAC division. Your raw list lives in Sheet1!A2:D11. It includes vendor names, invoice IDs, amounts, and notes. Some vendors (like "TerraLogix") appear in notes even when they’re not the primary vendor — and you need to flag those where the Vendor Name column does not contain the word "Global" anywhere.
A (Vendor)B (Invoice ID)C (Amount)D (Notes)
Sunrise Tech LtdINV-8842$12,450Payment pending approval
GlobalNet SolutionsINV-8843$8,920GlobalNet account #GNS-771
Acme CorpINV-8844$3,200Urgent — ship by 2024-03-15
GlobalEdge SystemsINV-8845$15,600Includes GlobalEdge SLA addendum
TerraLogix IncINV-8846$7,100Global reference: GBL-2024-TLX
Vertex DynamicsINV-8847$22,300Global support contract attached
NexusSoftINV-8848$5,400Final reconciliation complete
GlobalCore PartnersINV-8849$18,750GlobalCore PO# GC-9921
Orion LabsINV-8850$4,800Global compliance audit required
StellarLink GroupINV-8851$9,200No global dependencies

The Challenge

You need a column (say, E2:E11) that returns TRUE only when A2 does not contain "Global" — case-insensitive, ignoring partials like "Global" inside "GlobalCore" or "GlobalNet". Sounds simple. But here’s what trips people up: • COUNTIF(A2,"*Global*") returns 0 for blanks — so "does not contain" becomes TRUE for empty cells, which is wrong. • SEARCH("Global",A2) throws #VALUE! on blanks or mismatches — breaking whole formulas. • Using UPPER() + ISERROR(SEARCH()) seems safe… until you realize SEARCH is case-insensitive by default, making UPPER() redundant and slower. And yes — this came up last Thursday during a vendor reconciliation call with finance in Hangzhou. Sarah Chen typed =NOT(ISNUMBER(SEARCH("Global",A2))) into E2… then copied down. She got 3 FALSE positives because "TerraLogix" had "Global" in the Notes column — but her formula was only checking Vendor (A2). Easy to miss.

Walking Through It

We’ll build the correct logic step-by-step in column E. Start in E2. Step 1: Test for presence
Type =ISNUMBER(SEARCH("Global",A2)) in E2. This returns TRUE if "Global" appears anywhere in A2 — no case sensitivity needed.
A (Vendor)E (Contains "Global"?)
Sunrise Tech LtdFALSE
GlobalNet SolutionsTRUE
Acme CorpFALSE
GlobalEdge SystemsTRUE
TerraLogix IncFALSE
Vertex DynamicsFALSE
NexusSoftFALSE
GlobalCore PartnersTRUE
Orion LabsFALSE
StellarLink GroupFALSE
Step 2: Flip it — but handle blanks
=NOT(ISNUMBER(SEARCH("Global",A2))) looks right… until A6 is blank. Then SEARCH fails with #VALUE!. So wrap it: =IF(A2="",FALSE,NOT(ISNUMBER(SEARCH("Global",A2)))) That’s safer — but still flawed. Why? Because FALSE means “doesn’t contain Global”, yet blank cells shouldn’t count as “not containing”. In procurement, blank vendor fields are data errors — they need flagging, not silent exclusion. The fix: Use =AND(A2<>"",NOT(ISNUMBER(SEARCH("Global",A2)))) Now E2 returns TRUE only when A2 is non-blank AND doesn’t contain "Global". Copy that down to E11. You’ll get:
A (Vendor)E (Does NOT contain "Global")
Sunrise Tech LtdTRUE
GlobalNet SolutionsFALSE
Acme CorpTRUE
GlobalEdge SystemsFALSE
TerraLogix IncTRUE
Vertex DynamicsTRUE
NexusSoftTRUE
GlobalCore PartnersFALSE
Orion LabsTRUE
StellarLink GroupTRUE
Pro tip: Press Alt + H + F + I to auto-fit column widths after pasting formulas. Saves 12 seconds per sheet.

The Result

Here’s your final cleaned list — now filtered to show only rows where Vendor does not contain "Global" (i.e., E2:E11 = TRUE):
A (Vendor)B (Invoice ID)C (Amount)D (Notes)
Sunrise Tech LtdINV-8842$12,450Payment pending approval
Acme CorpINV-8844$3,200Urgent — ship by 2024-03-15
TerraLogix IncINV-8846$7,100Global reference: GBL-2024-TLX
Vertex DynamicsINV-8847$22,300Global support contract attached
NexusSoftINV-8848$5,400Final reconciliation complete
Orion LabsINV-8850$4,800Global compliance audit required
StellarLink GroupINV-8851$9,200No global dependencies
Notice: TerraLogix stays — because its *Vendor* field doesn’t contain "Global", even though the Notes do. That’s intentional. You’re filtering on Vendor, not Notes.

What Could Go Wrong

Here are three real failures we saw last month — all from copying formulas without adjusting references: Mistake #1: Forgetting $ signs in mixed ranges
If you type =AND(A2<>"",NOT(ISNUMBER(SEARCH("Global",A2)))) in E2 but then drag it while referencing a fixed lookup table like $Z$1:$Z$100 elsewhere, and accidentally make it $A2 instead of A2 — every row checks only the first vendor. You’ll think “Sunrise Tech” appears 10 times. Mistake #2: Using FIND instead of SEARCH
FIND is case-sensitive. So "global" won’t match "Global" — and you’ll get FALSE where you expect TRUE. SEARCH handles it automatically. No need to overcomplicate. Mistake #3: Applying the formula to Notes instead of Vendor
Sarah Chen did this. Her filter showed 0 rows because she ran =AND(D2<>"",NOT(ISNUMBER(SEARCH("Global",D2)))) — checking Notes. That returned FALSE for every row except NexusSoft (which truly had no "Global" in Notes). She spent 47 minutes wondering why the list was empty. Here’s your action checklist — copy-paste ready:
TaskCell RangeFormula
Flag vendors NOT containing "Global"E2:E11=AND(A2<>"",NOT(ISNUMBER(SEARCH("Global",A2))))
Filter to show only those vendorsSelect A1:E11 → Data tab → FilterClick dropdown in E1 → check TRUE only
Quickly jump to first formula cellCtrl + G → type E2 → Enter
Auto-fit all columns after pasteAlt + H + F + I
James Chen

James Chen

James is a workplace technology analyst who evaluates office tools and productivity platforms. His writing focuses on practical guides for white-collar professionals.