# Exact Function - Case Sensitive Comparison in Excel

Author: | Edits: don

(Video tutorial's page: Compare Values in Excel - Beginner to Advanced)

Case-sensitive comparison of two text strings or values in Excel.

To do this, we use the EXACT() function.

### Sections:

Syntax

Simple Example - Compare Values

IF Statement EXACT Example

Notes

## Syntax

``=EXACT(text1,text2)``
Argument Description
text1

The first string to compare.

Can be a cell reference or text entered into the function - if it is text entered directly into the function, you need to surround it with quotation marks.

text2

The secont string to compare.

Can be a cell reference or text entered into the function - if it is text entered directly into the function, you need to surround it with quotation marks.

TRUE or FALSE

## Simple Example - Compare Values

Let's compare simple text values to see if they are equal.

``=EXACT(A2,B2)`` Result The "R" is capitalized in Text 2 but not in Text 1, so the function returns False.

If we try it with the next row, it will return true because "red" and "red" are exactly the same. Result ## IF Statement EXACT Example

The EXACT function becomes a lot more useful when we use it in conjuction with the IF statement.

Let's Check if the value in cell A5 is exactly the same as the value in cell B5 and, if it is, return the value from cell B5, but, if it's not, return descriptive text.

``=IF(EXACT(A5,B5),B5,"Not exact match.")`` Result In this example, we want to know if two identification values are the same or not - in order to increase the number of possible combinations, websites like YouTube make a distinction between the case of letters for the URLs of the videos.

If you want to test the above example to see how it works in the real world, you can input each of the below URLs into the browser to see the difference:

## Notes

Excel Function: EXACT(), IF()

#### Question? Ask it in our Excel Forum

Our Excel Courses

#### Professional Input Forms in Excel • Skill Level: All Levels
• |
• 5 hours+

How to make a fully featured professional form in Excel that is unbreakable. This includes how to use the form to store, view, edit, and delete data from a data storage worksheet.

#### Send Emails from Excel (Multiple Methods) • Skill Level: All Levels
• |
• 2 hours

Send Emails from Excel using VBA and Macros. This course starts from the Basics and builds up to more advanced examples with attaching workbooks, worksheets, PDF's, automatically sending emails, including a signature, error handling, increasing speed, and more.

Tutorial Details
Excel Function: EXACT(), IF()