Exact Function in Excel

This guide treats “exact function in excel” the way busy spreadsheet users actually want it: answer first, a live tool to prove it on your own data, then the reasoning. It is written for Excel but calls out every place Google Sheets differs, and the platform toggle at the top switches all shortcuts between Windows and Mac so nothing here assumes the keyboard you are not on.

Exact answer

In Excel: use =EXACT(text1, text2) — it compares two values case-SENSITIVELY, where the = operator does not.

On this page8

Syntax

=EXACT(text1, text2)

Arguments

Argumentrequired / optionalDescription
text1requiredThe first value to compare.
text2requiredThe second value. Comparison is case-sensitive.

Related functions

FINDLENSEARCH
ƒxCompare Two ListsLive
Values in both lists
2

Only in A: 2 · Only in B: 1

=COUNTIF(B:B,A2)>0
Ctrl+CthenCtrl+Shift+V+Cthen+Ctrl+VPaste values · WindowsMac

Need it as an auditable file?

Ships inside the linked template — formula-driven, unlocked, audit-ready.

View template

What this does

EXACT compares two text values and returns TRUE only if they match character for character, including case. That matters because Excel's own = operator is case-insensitive: "ABC"="abc" returns TRUE, which surprises anyone coming from a database. Wherever case carries meaning — product codes, passwords, case-sensitive identifiers from an external system — EXACT is the only comparison that tells the truth. Combined with SUMPRODUCT it also powers a case-sensitive lookup, which VLOOKUP and XLOOKUP cannot do at all. The same idea underpins a lot of everyday Excel work, so the few minutes spent getting it right here pay back across every sheet you build afterwards. Treat it as a pattern, not a one-off, and it stops being something you look up and starts being something you reach for. For “exact function in excel”, the reliable version is a short checking loop, not just the first command that appears to work. Run it on a deliberately small range first, watch how the affected formula change, and only then apply the same setup to the full sheet. When a formula is involved, keep the inputs labelled beside it, reference cells instead of typing values, and apply number formatting only after the result checks out. That is what makes a calculation you can defend to a CFO or an auditor useful in real work: repeatable, auditable, and not dependent on memory or luck.

A worked example

Comparing two code columns where case matters: =EXACT(A2, B2) returns FALSE for "AB-1024" against "ab-1024", where =A2=B2 returns TRUE. A case-sensitive lookup: =INDEX(C2:C500, MATCH(TRUE, EXACT(A2:A500, "AB-1024"), 0)). Counting exact matches: =SUMPRODUCT(--EXACT(A2:A500, "Active")). EXACT is the only truthful comparison when case carries meaning, and Excel's default operator quietly does not. One habit worth forming early: name the cells that hold your inputs, so the formula reads in plain language instead of a string of cell addresses. A reviewer — or you in three months — can then follow the logic without decoding what B7 and D2 were supposed to mean, which is most of what makes a sheet maintainable.

In Google Sheets

Everything above works in Google Sheets too. Excel and Sheets share the formula syntax used here; only the surrounding menus are arranged differently. That portability is deliberate — learn it once and it follows you between the two tools and across Windows and Mac. The aim was to get you unstuck fast and leave you a little more capable than a copy-paste would. The answer is at the top, the tool proves it, and the detail above shows why it holds — so the next time a colleague asks, you can answer without reaching for search. Treat “exact function in excel” as a small building block rather than a chore. Once the inputs sit in their own cells and the formula reads from them, the same setup answers a dozen related questions with a tweak, and Excel keeps every dependent figure current as the data changes. The tool above is there so you can rehearse and verify before committing anything to a real workbook; the steps and worked example are there so the logic sticks. Get it right once and it stops costing you time — it starts saving it, every time the question comes back around.

Common mistakes

  • Assuming = is case-sensitive; it is not, which is precisely why EXACT exists.
  • Comparing values with different trailing whitespace and blaming case — wrap both in TRIM first.
  • Expecting EXACT to ignore formatting differences; it compares the underlying values only.

Frequently asked questions

Is Excel's = operator case-sensitive?

No. "ABC"="abc" returns TRUE. Use EXACT when case must match.

How do I do a case-sensitive VLOOKUP?

Neither VLOOKUP nor XLOOKUP can. Use =INDEX(result, MATCH(TRUE, EXACT(lookup_range, value), 0)).

Why does EXACT return FALSE on values that look identical?

Almost always trailing whitespace. Compare =LEN of each to confirm, then TRIM both sides.