Contact

EXACT Function in Google Sheets: Examples, Pitfalls & Compatibility

Text Beginner Google Sheets

EXACT in Google Sheets: compare two text values with case and spaces included in the comparison. Includes worked examples and application-specific cautions.

Verification status: Official documentation referenced; example outcomes independently reasoned or arithmetically checked where stated. Not executed in Google Sheets. How formula examples are checked

Quick answer: Use EXACT in Google Sheets to compare two text values with case and spaces included in the comparison. The official EXACT reference is the source for the function definition and platform-specific rules described below.

Syntax and arguments

=EXACT(string1, string2)

string1 (required): The first text value to compare.

string2 (required): The second text value, including any spaces or control characters.

Examples use English function names, comma argument separators and decimal points. Adapt formula separators to your workbook settings, not punctuation inside quoted text.

When to use it

Use EXACT for case-sensitive identifiers, confirmation fields or a before-and-after text audit. A visually similar pair of cells is not enough. Choose a different comparison rule when capitalization is deliberately irrelevant.

Three worked examples

Each example is independent. Where input cells are listed, enter those values first; otherwise the formula is self-contained. Expected outputs are independently checked calculations or documented error expectations, not captured results from Google Sheets.

Example 1: Compare two import keys

=EXACT("Rack-A3","Rack-A3")

Expected result: TRUE.

All characters and their case match.

Example 2: Check a case-sensitive suffix

=EXACT("Rack-A3","Rack-a3")

Expected result: FALSE.

The capital A and lowercase a are different for this comparison.

Example 3: Expose a hidden separator

=EXACT("AB", "A"&CHAR(9)&"B")

Expected result: FALSE.

A tab exists in the second value even when the display makes the two strings look very similar.

Put it to work safely

Place the original identifier and imported identifier in adjacent columns, then fill down a separate EXACT result. Filter for FALSE and inspect those rows without deleting them automatically. A mismatch might be a meaningful case change, a trailing space or a changed code. Decide the business rule before applying LOWER, UPPER or TRIM to both sides, because those operations intentionally discard distinctions.

Common mistakes and fixes

The words look identical but return FALSE. Check trailing spaces, embedded controls and case. A cell display may not make every stored character obvious.

The comparison should ignore case. Normalize case deliberately before comparing, or use an appropriate case-insensitive matching method. Do not describe that operation as an exact raw-text audit.

TRUE is being interpreted as a numeric count. EXACT returns a logical value. Keep a clear result heading and distinguish the flag from the number of matching records.

Google Sheets-specific notes

Google states that matching text must also have the same case, spaces and hidden characters. This is useful for imported form data where a trailing space can be difficult to notice visually. See the vendor reference for the current definition.

Excel and Google Sheets comparison

Both applications document case-sensitive text comparison. Avoid inferring identical coercion rules for numbers, blanks and dates from these text-only examples. Unicode strings that look alike also deserve a target-application check.

Compare the EXACT guide for Microsoft Excel and its official documentation. Having a guide in both libraries establishes two documented references, not a certificate of identical behavior across releases, locales or file conversions.

Evidence and testing scope

Editorial verification: Official references retrieved on 2026-10-12. The three worked cases are included in this release’s reproducible Python checking suite. It checks the stated arithmetic, calendar or text model and the expected documented error classification; it is not the Google Sheets calculation engine. No native application run, UI screenshot, maximum-size benchmark or cross-version certification is claimed. Review the editorial testing standards before relying on a formula in a critical workbook.