Text Excel Formula

EXACT Formula in Excel: Examples, Syntax, Tips

Learn the EXACT formula in Excel with a beginner-friendly explanation, syntax, copy-paste examples, step-by-step instructions, and common mistakes.

Copy-paste examplesBeginner friendlyCommon mistakesStep-by-step

💡 Ideas for You

Helpful learning resources for EXACT formula.

4 useful links
📚 Step-by-step booksBeginner-friendly learning resources from Create & Learn.📘 Data cleaning guidesResources for cleaning text, names, codes, and messy exports.🧮 Formula cheat sheetsQuick references for common spreadsheet formulas.📊 Reporting guidesResources for turning formula results into useful reports.

Quick answer

The EXACT formula compares two text values and returns TRUE only when they match exactly, including case.

Starting formula
=EXACT(A2,B2)

Syntax

Use this syntax as the pattern, then replace the sample arguments with your own cells, ranges, and criteria.

Syntax
=EXACT(text1, text2)

When to use it

Text formulas are essential when data comes from forms, exports, CRMs, accounting systems, or copied lists. They turn messy labels, names, codes, and descriptions into clean columns you can analyze.

  • Combine first and last names
  • Extract text before or after a delimiter
  • Remove extra spaces or line breaks
  • Convert names to proper case

Example worksheet layout

Test the formula in a small worksheet first. This makes it easier to confirm the result before copying the formula down hundreds of rows.

Column or rangeWhat it represents
AOriginal messy text
BCleaned, combined, or extracted result
COptional helper/check column

Copy-paste examples

These examples move from simple to more practical versions. Start with the beginner examples, confirm the result, then adapt the intermediate and advanced versions.

Beginner

Basic EXACT example

Example formula
=EXACT(A2,B2)

Use this on one messy text value first.

Beginner

Avoid results on blank rows

Example formula
=IF(A2="","",EXACT(A2,B2))

Keep your output column clean when the source column has blank rows.

Intermediate

Clean extra spaces first

Example formula
=TRIM(EXACT(A2,B2))

TRIM is helpful before matching, sorting, or comparing text.

Intermediate

Combine with lowercase for matching

Example formula
=LOWER(EXACT(A2,B2))

Standardize text before lookups or duplicate checks.

Advanced

Handle missing delimiters

Example formula
=IFERROR(EXACT(A2,B2),"")

Avoid errors when not every value has the expected pattern.

Advanced

Create a clean reporting field

Example formula
=PROPER(TRIM(EXACT(A2,B2)))

Useful when preparing labels for dashboards or pivot tables.

How to use it step by step

  1. Put your raw data in clear columns with headers such as Amount, Date, Status, Region, or Customer.
  2. Paste the starting formula into the first result cell, usually row 2.
  3. Replace sample references such as A2, B2, or $F$2:$F$100 with the cells in your own worksheet.
  4. Check the result on a few rows where you already know the expected answer.
  5. Copy the formula down only after the first row returns the right result.

Common mistakes and fixes

  • The source text has leading, trailing, or non-printing characters.
  • The delimiter is not present in every row.
  • Numbers that look like text are not converted before calculations.
  • Test the formula on a few known rows before using it across a full report.

Beginner tips

  • Use a small sample first so you can see exactly how the EXACT formula behaves.
  • Convert your source range into an Excel Table when the data will grow over time.
  • Add a short note near important formulas so future users know what each input represents.

Related formula examples