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

Data Analysis

  • Excel Pie Chart
  • How to Create Thermometer Chart in Excel
  • Create Scatter Chart in Excel
  • How To Perform and Interpret Regression Analysis in Excel
  • Example of COUNTIFS with variable table column in Excel

References

  • Count rows with at least n matching values
  • How to use Excel LOOKUP Function
  • Lookup entire row in Excel
  • Get nth match with INDEX / MATCH in Excel
  • How to get last column number in range in Excel

Data Validations

  • Excel Data validation must contain specific text
  • Excel Data validation no punctuation
  • How To Create Drop-down List in Excel
  • Data validation must not exist in list
  • Excel Data validation allow weekday only

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

  • Invoice status with nested if in Excel
  • IFNA function: Description, Usage, Syntax, Examples and Explanation
  • Nested IF function example in Excel
  • How to use Excel FALSE Function
  • IF with boolean logic in Excel

Date Time

  • Convert text to date in Excel
  • Excel Date & Time Functions Example
  • Steps to create Dynamic calendar grid in Excel
  • Custom weekday abbreviation in Excel
  • Display Days until expiration date in Excel

Grouping

  • Calculate conditional mode with criteria in Excel
  • How to randomly assign people to groups in Excel
  • Map text to numbers in Excel
  • Map inputs to arbitrary values in Excel
  • Group arbitrary text values in Excel

General

  • How to get random value from list or table in Excel
  • Delete Blank Rows at Once in Excel
  • How to generate random number weighted probability in Excel
  • How to calculate percent of goal in Excel
  • How to make excel worksheets print on one page?
© 2026 xlsoffice . All Right Reserved. | Teal Smiles | Abbreviations And Their Meaning