How to Use Excel EXACT Function (6 Suitable Examples)

The Excel EXACT function tests two text strings and returns TRUE or FALSE depending on their exact match or otherwise respectively. The EXACT function is case-sensitive, which means it takes upper and lower cases into account.

Exact function Quick overview-Excel EXACT function


Excel EXACT Function: Syntax and Arguments

Function Objective:

The EXACT function compares two texts then returns TRUE if the texts are exactly the same or FALSE otherwise.

Syntax:

 EXACT (text1,text2)

Exact function syntax

Arguments Explanation: 

Arguments      Required/Optional Explanation
                         text1                       Required                   First text string
                         text1                       Required                  Second text string

Return Parameter:

TRUE or FALSE depending on the exact match between two arguments.

Version:

Excel 2019 onward


How to Use the Excel EXACT Function: 6 Suitable Examples

Example 1 – Using the EXACT Function to Compare Entries in Dataset 

We have two text strings in columns B and C. We want to check if the entries in columns B and C are an exact match or not. The result will be in column D.

  • Enter the following formula in cell D5.
 =EXACT(B5,C5)

comparing entries-Excel EXACT function

  • Press Enter.

comparing entries

  • Apply a similar formula to other cells or use AutoFill.

comparing entries result-Excel EXACT function


Example 2 – Checking If Text Is in Upper or Lower Case Using EXACT  

Upper Case:

Use this formula to check whether B5 is in uppercase.

=EXACT(B5,UPPER(B5))

Upper case -Excel EXACT function

  • Apply the formula to a cell such as C5 and hit Enter to see the result.

Upper case result

  • AutoFill if needed.

Upper case Data Type-Excel EXACT function

Lower Case:

Here’s the formula that checks if the text from B5 is in lowercase.

=EXACT(B5,LOWER(B5))

Lower Case

  • Apply the formula to a cell such as C5 and hit Enter to see the result.

Lower Case formula result

  • AutoFill if needed.

Lower Case -Excel EXACT function


Example 3 – Entering Data in a Specific Format Using the EXACT Function

  • Use the following formula in C5 to check if the format of B5 is proper.
=EXACT(B5,PROPER(B5))

specific format-Excel EXACT function

  • Hit Enter.

specific format result

  • AutoFill if needed.

specific format-Excel EXACT function

  • To apply Data Validation, select a range of cells then go to Data tab and select Data Validation (from the Data Tools section).

specific format-Excel EXACT function

You’ll get a Data Validation dialog box

  • Select Custom in the Allow command box.
  • Enter the aforementioned formula in the Formula command box.
  • You can also set an Input (i.e., Input Type; Please Enter Text in Proper Format) and Error Message (i.e., Input Error; Please Enter Text in Proper format) to guide the users.
  • Click OK.

specific format

  • If you try to enter non-proper text (i.e., Jane doe), you’ll get an Error Message (if you set it earlier).

Input error

Here are the results of various checks.

specific format final -Excel EXACT function


Example 4 – Using the EXACT Function in Case-Sensitive Formulas

We have case sensitive IDs and we want to count any occurrence for a specific ID (i.e., FCL002).

  • Use the following formula to count the occurrence of FCL002 (from D6) in any format in the dataset.
=COUNTIF(B6:B13,D6)

COUNTIF formula

You get 3 as the COUNTIF function is not case-sensitive.

  • Use the following formula to count the same ID (i.e., FCL002) and you get 1.
=SUMPRODUCT(--EXACT(B6:B13,D11))

SUMPRODUCT and EXACT function-Excel EXACT function


Example 5 – Spot Extra Spaces Using EXACT

  • Use the following formula in D5.
=EXACT(B5,C5)

Spot Space

Press Enter. Although the two texts (i.e., B5, C5) look the same when in the cell, there’s a leading space in one entry. The EXACT function returns FALSE.

leading space

  • AutoFill if needed.

Spot all spaces-Excel EXACT function


Example 6 – Ignoring Cell Formats

  • Use the following formula in D5.
=EXACT(B5,C5)

ignoring cell format-Excel EXACT function

  • Press ENTER and drag the Fill Handle to apply the formula to the other entries. Except the Date format, the EXACT function considers all the entries as the same.

Fill handle

The EXACT function ignores formats except for the Date format as shown in the following picture.

ignoring cell format final result-Excel EXACT function


Things to Keep in Mind

  • The EXACT function is case-sensitive and converts numeric values to texts.
  • It returns TRUE or FALSE depending on case patterns of texts.
  • The function ignores cell formats (except some cell formats like Date or Time since they are stored as serial numbers).

Download the Workbook


<< Go Back to Excel Functions | Learn Excel

Get FREE Advanced Excel Exercises with Solutions!
Maruf Islam
Maruf Islam

MARUF ISLAM is an excellent marine engineer who loves working with Excel and diving into VBA programming. For him, programming is like a superhero tool that saves time when dealing with data, files, and the internet. His skills go beyond the basics, including ABACUS, AutoCAD, Rhinoceros, Maxsurf, and Hydromax. He got his B.Sc in Naval Architecture & Marine Engineering from BUET, and now he's switched gears, working as a content developer. In this role, he creates techy content... Read Full Bio

We will be happy to hear your thoughts

Leave a reply

Advanced Excel Exercises with Solutions PDF

 

 

ExcelDemy
Logo