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

Data Analysis

  • How To Remove Duplicates In Excel Column Or Row?
  • Add Outline to Data in Excel
  • Example of COUNTIFS with variable table column in Excel
  • How to calculate current stock or inventory in Excel
  • Remove Duplicates Example in Excel

References

  • How to get last row in mixed data with blanks in Excel
  • Two-way lookup with VLOOKUP in Excel
  • MATCH function: Description, Usage, Syntax, Examples and Explanation
  • How to use Excel ROWS Function
  • How to use Excel COLUMN Function

Data Validations

  • Excel Data validation whole percentage only
  • Excel Data validation date in specific year
  • Excel Data validation require unique number
  • Data validation must not exist in list
  • Excel Data validation must not contain

Find duplicate values in two columns in Excel

by

This tutorial shows how to Find duplicate values in two columns in Excel using the example below;

Formula

=AND(COUNTIF(range1,A1),COUNTIF(range2,A1))

Explanation

To highlight duplicate values in two or more columns, you can use conditional formatting with on a formula based on the COUNTIF and AND functions.

In the example shown, the formula used to highlight duplicate values is:

=AND(COUNTIF(range1,B5),COUNTIF(range2,B5))

Both ranges were selected at the same when the rule was created.

How this formula works

This formula uses two named ranges, “range1” (B5:B12) and “range2” (D5:D10).

The core of this formula is the COUNTIF function, which returns a count of each value in both range inside the AND function:

COUNTIF(range1,B5) // count in range1
COUNTIF(range2,B5) // count in range2

COUNTIF will either return zero (evaluated as FALSE) or a positive number (evaluated as TRUE) for each value in both ranges.

If both counts are positive (i.e. non-zero), the AND function will return TRUE and trigger the conditional format.

Post navigation

Previous Post:

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

Next Post:

Excel Data validation require unique number

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

  • FALSE function: Description, Usage, Syntax, Examples and Explanation
  • XOR function: Description, Usage, Syntax, Examples and Explanation
  • How to use Excel AND Function
  • AND function: Description, Usage, Syntax, Examples and Explanation
  • IF, AND, OR and NOT Functions Examples in Excel

Date Time

  • Assign points based on late time in Excel
  • How to calculate Next working/business day in Excel
  • How to get number of days, weeks, months or years between two dates in Excel
  • Get work hours between dates custom schedule in Excel
  • Calculate days remaining in Excel

Grouping

  • Categorize text with keywords in Excel
  • Running count group by n size in Excel
  • How to randomly assign people to groups in Excel
  • Map text to numbers in Excel
  • If cell contains one of many things in Excel

General

  • How to Create Calendar in Excel
  • Select, Insert, Rename, Move, Delete Worksheets in Excel
  • Convert column number to letter in Excel
  • AutoRecover file that was never saved in Excel
  • How to add sequential row numbers to a set of data in Excel
© 2026 xlsoffice . All Right Reserved. | Teal Smiles | Abbreviations And Their Meaning