EXACT Function (LibreOffice Calc)

Text Beginner LibreOffice Calc Introduced in LibreOffice 3.0
text comparison validation case-sensitive data-cleaning

The EXACT function compares two text strings and returns TRUE if they are exactly the same, including case. It is used for strict text validation, data cleaning, and case-sensitive comparisons.

Compatibility

â–ľ

What the EXACT Function Does â–ľ

  • Compares two text strings
  • Returns TRUE if they match exactly
  • Returns FALSE if they differ in any way
  • Case‑sensitive
  • Useful for data validation, cleaning, and strict matching

Syntax â–ľ

EXACT(text1; text2)

Arguments

  • text1:
    First text string.

  • text2:
    Second text string.

Basic Examples â–ľ

Case‑sensitive comparison

=EXACT("Nick"; "Nick")
→ TRUE

=EXACT("Nick"; "nick")
→ FALSE

Compare cell values

=EXACT(A1; B1)

Compare numbers as text

=EXACT("123"; "123")
→ TRUE

=EXACT("123"; "0123")
→ FALSE

Advanced Examples â–ľ

Validate user input

=IF(EXACT(A1; "YES"); "Confirmed"; "Invalid")

Detect trailing spaces

=EXACT(A1; TRIM(A1))
→ FALSE if extra spaces exist

Case‑sensitive password or code check

=EXACT(A1; B1)

Use EXACT in array validation

=SUMPRODUCT(EXACT(A1:A10; "OK"))

Compare normalized text

=EXACT(LOWER(A1); LOWER(B1))

Detect invisible characters

=EXACT(A1; CLEAN(A1))

Edge Cases and Behavior Details â–ľ

EXACT returns TRUE or FALSE

Behavior details

  • Case‑sensitive
  • Treats numbers as text if quoted
  • Empty strings compare normally
  • Whitespace differences matter
  • EXACT(“A”; “A “) → FALSE

Invalid input → coerced to text

No error unless references are invalid.

Common Errors and Fixes â–ľ

Unexpected FALSE

Cause:

  • Case mismatch
  • Trailing spaces
  • Hidden characters
  • Different encodings

Fix:

  • Use TRIM(), CLEAN(), LOWER(), UPPER()

Comparing numbers vs text

Cause:

  • EXACT(“5”; 5) → FALSE

Fix:

  • Convert both to text or both to numbers

Best Practices â–ľ

  • Use EXACT for strict text validation
  • Use LOWER/UPPER when case‑insensitive comparison is desired
  • Clean data before comparison (TRIM, CLEAN)
  • Use EXACT in data‑cleaning pipelines to detect anomalies
  • Document comparison rules in models
EXACT is your precision tool for text comparison — perfect for validation, cleaning, and any workflow where “almost equal” isn’t good enough.

Related Patterns and Alternatives â–ľ

  • =A1=B1 — case‑insensitive comparison
  • FIND — case‑sensitive substring search
  • SEARCH — case‑insensitive substring search
  • TRIM / CLEAN — text normalization
  • LOWER / UPPER — case normalization

By mastering EXACT, you can build robust, reliable text‑validation and data‑cleaning workflows in LibreOffice Calc.

Copyright 2026. All rights reserved.