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.

**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)**

⦽ **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)`

- Press
**Enter.**

- Apply a similar formula to other cells or use
**AutoFill.**

**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))`

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

**AutoFill**if needed.

__Lower Case:__

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

`=EXACT(B5,LOWER(B5))`

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

**AutoFill**if needed.

**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))`

- Hit
**Enter.**

**AutoFill**if needed.

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

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**.

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

Here are the results of various checks.

**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)`

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))`

**Example 5 – Spot Extra Spaces Using EXACT**

- Use the following formula in
**D5**.

`=EXACT(B5,C5)`

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**.

**AutoFill**if needed.

**Example 6 – Ignoring Cell Formats**

- Use the following formula in
**D5.**

`=EXACT(B5,C5)`

- 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.

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

**⧭ 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**