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

Data Analysis

  • How to do a t-Test in Excel?
  • Everything about Charts in Excel
  • How to calculate average last N values in a table in Excel
  • Move chart to a separate worksheet in Excel
  • Number and Text Filters Examples in Excel

References

  • Two-way lookup with VLOOKUP in Excel
  • Perform case-sensitive Lookup in Excel
  • How to get relative row numbers in a range in Excel
  • How to use Excel LOOKUP Function
  • Two-column Lookup in Excel

Data Validations

  • Excel Data validation must not contain
  • Excel Data validation require unique number
  • Excel Data validation whole percentage only
  • Excel Data validation must begin with
  • Excel Data validation must contain specific text

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.

Worked Example:   COUNTIF with non-contiguous range in Excel

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).

Worked Example:   Count cells that begin with in Excel

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.

Worked Example:   Highlight rows with dates between In Excel

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

Post navigation

Previous Post:

VLOOKUP without #N/A error in Excel

Next Post:

How to Create Gantt Chart in Excel

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
  • Extract multiple matches into separate rows in Excel
  • How to return blank in place of #DIV/0! error in Excel
  • How to use Excel TRUE Function
  • Return blank if in Excel

Date Time

  • ISOWEEKNUM function: Description, Usage, Syntax, Examples and Explanation
  • Calculate number of hours between two times in Excel
  • How to calculate next scheduled event in Excel
  • Assign points based on late time in Excel
  • Add workdays to date custom weekends in Excel

Grouping

  • Group arbitrary text values in Excel
  • Map text to numbers in Excel
  • Group times into unequal buckets in Excel
  • Group numbers at uneven intervals in Excel
  • How to randomly assign people to groups in Excel

General

  • 3D SUMIF for multiple worksheets in Excel
  • Split Cell Content Using Text to Columns in Excel
  • Lock Cells in a Worksheet Excel
  • Count cells that do not contain errors in Excel
  • How to fill cell ranges with random number from fixed set of options in Excel
© 2023 xlsoffice . All Right Reserved. | Teal Smiles | Abbreviations And Their Meaning