Skip to content
Free Excel Tutorials
  • Home
  • Excel For Beginners
  • Excel Intermediate
  • Advanced Excel For Experts

Data Analysis

  • How to Use Solver Tool in Excel
  • Data Series in Excel
  • How to Create Thermometer Chart in Excel
  • How To Create Frequency Distribution in Excel
  • How to count table rows in Excel

References

  • Two-way lookup with VLOOKUP in Excel
  • Extract all partial matches in Excel
  • How to use Excel MATCH Function
  • Get nth match with INDEX / MATCH in Excel
  • How to use Excel COLUMN Function

Data Validations

  • Excel Data validation date in next 30 days
  • Excel Data validation no punctuation
  • Excel Data validation whole percentage only
  • Excel Data validation must begin with
  • Excel Data validation exists in list

How to compare two text strings in Excel

by

If you need to compare two text strings in Excel to determine if they’re equal, you can use the EXACT function.

Formula

=EXACT(text1, text2)

Explanation

For example, if you want to compare A2 with B2, use:

=EXACT(A2,B2)

If the two strings are identical, EXACT will return TRUE. If not, EXACT will return FALSE. You can use this result inside the IF function to display a message or make a conditional calculation. For example, to display the message “Yes” for a match and “No” if not, use:

=IF(EXACT(A2,B2),"Yes","No")

Note the EXACT function is case sensitive. If you don’t care about case, you can simply use the equal sign like so:

=A2=B2

Visit: Case-sensitive and case-insensitive ways to Compare Text in Excel examples.

This formula will return TRUE or FALSE, and will treat “Apple” and “apple” as the same.

Post navigation

Previous Post:

DECIMAL function: Description, Usage, Syntax, Examples and Explanation

Next Post:

AVERAGE function: Description, Usage, Syntax, Examples and Explanation

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Learn Basic Excel

Ribbon
Workbook
Worksheets
Format Cells
Find & Select
Sort & Filter
Templates
Print
Share
Protect
Keyboard Shortcuts

Categories

  • Charts
  • Data Analysis
  • Data Validation
  • Excel Functions
    • Cube Functions
    • Database Functions
    • Date and Time Functions
    • Engineering Functions
    • Financial Functions
    • Information Functions
    • Logical Functions
    • Lookup and Reference Functions
    • Math and Trig Functions
    • Statistical Functions
    • Text Functions
    • Web Functions
  • Excel VBA
  • Excel Video Tutorials
  • Formatting
  • Grouping
  • Others

Logical Functions

  • SWITCH function example in Excel
  • TRUE function: Description, Usage, Syntax, Examples and Explanation
  • How to use IFS function in Excel
  • Invoice status with nested if in Excel
  • How to use Excel AND Function

Date Time

  • TIME function: Description, Usage, Syntax, Examples and Explanation
  • DAY function: Description, Usage, Syntax, Examples and Explanation
  • Get days, months, and years between dates in Excel
  • How to determine year is a leap year in Excel
  • Add decimal hours to time in Excel

Grouping

  • Group numbers at uneven intervals in Excel
  • Map inputs to arbitrary values in Excel
  • How to randomly assign people to groups in Excel
  • If cell contains one of many things in Excel
  • Group arbitrary text values in Excel

General

  • AutoFit Column Width, AutoFit Row Height in Excel
  • Creating and Opening an existing file in Excel
  • List sheet names with formula in Excel
  • Sum by group in Excel
  • How to calculate percent of students absent in Excel
© 2026 xlsoffice . All Right Reserved. | Teal Smiles | Abbreviations And Their Meaning