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

Data Analysis

  • Randomize/ Shuffle List in Excel
  • How To Perform and Interpret Regression Analysis in Excel
  • Conditional Formatting Data bars Examples in Excel
  • Understanding Anova in Excel
  • How to calculate correlation coefficient Correlation in Excel

References

  • How to get relative column numbers in a range in Excel
  • LOOKUP function: Description, Usage, Syntax, Examples and Explanation
  • To count total rows in a range in Excel
  • Two-way lookup with VLOOKUP in Excel
  • Basic INDEX MATCH approximate in Excel

Data Validations

  • Excel Data validation unique values only
  • Prevent invalid data entering in specific cells
  • How To Create Drop-down List in Excel
  • Excel Data validation allow uppercase only
  • Excel Data validation whole percentage 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

  • NOT function: Description, Usage, Syntax, Examples and Explanation
  • Invoice status with nested if in Excel
  • IF with boolean logic in Excel
  • OR function: Description, Usage, Syntax, Examples and Explanation
  • Excel If, Nested If, And/Or Criteria Examples

Date Time

  • How to enter Today’s Date or Static Date and Time in Excel
  • MONTH function: Description, Usage, Syntax, Examples and Explanation
  • Series of dates by day
  • Sum through n months in Excel
  • Sum race time splits in Excel

Grouping

  • How to randomly assign data to groups in Excel
  • Group arbitrary text values in Excel
  • Categorize text with keywords in Excel
  • How to randomly assign people to groups in Excel
  • Running count group by n size in Excel

General

  • Select, Insert, Rename, Move, Delete Worksheets in Excel
  • 231 Keyboard Shortcut Keys In Excel
  • How to calculate percent sold in Excel
  • How to fill cell ranges with random number from fixed set of options in Excel
  • How to get original price from percentage discount in Excel
© 2025 xlsoffice . All Right Reserved. | Teal Smiles | Abbreviations And Their Meaning