Practice free

EXACT function

EXACT compares two pieces of text and returns TRUE only if they are identical, including upper and lower case. It is useful for validating codes or case-sensitive IDs.

Example

Read it as a sentence: check whether F1, which is empty, matches empty text exactly, which gives TRUE.

Practice this in the app

Syntax

EXACT(text1, text2)

text1 (required)
The first text.
text2 (required)
The second text.

Returns: TRUE if the two are identical, including case; otherwise FALSE.

What Excel actually returns

Each formula below was run in desktop Excel. The result is exactly what the cell showed, errors included.

FormulaExcel showsCase
=EXACT("a","A") FALSE Case differs
=EXACT("a","a") TRUE Same
=EXACT(1,"1") TRUE Number vs text
=EXACT(TRUE,"TRUE") TRUE Bool vs text
=EXACT("a ","a") FALSE Trailing space
=EXACT(Data!F1,"") TRUE Blank vs empty text
=EXACT(Data!F1,Data!F8) TRUE Blank vs formula ""
=EXACT(Items!B2:B4,"Briar pipe") FALSE Range spills

The Data sheet these formulas read

A cell that starts with = holds that formula.

The Items sheet these formulas read

Watch out for

  • Trailing spaces make strings differ.
  • Formatting is ignored; only the underlying text is compared.

Where it works

Excel
EXACT is in every version of Excel from 2007 on.
Google Sheets
Same name, same behaviour for everyday use.

Part of Text functions. Every result on this page was measured in desktop Excel, build 16.0.20527. Last updated .