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

Data Analysis

  • Excel Pie Chart
  • How to calculate current stock or inventory in Excel
  • Get column name from index in Excel Table
  • How to count table columns in Excel
  • How to Create Gantt Chart in Excel

References

  • How to use Excel OFFSET function
  • Last row number in range
  • Excel Advanced Lookup using Index and Match Functions
  • How to use Excel ROW Function
  • Two-way lookup with VLOOKUP in Excel

Data Validations

  • Excel Data validation unique values only
  • Excel Data validation whole percentage only
  • Excel Data validation specific characters only
  • Excel Data validation must begin with
  • Data validation must not exist in list

Check if range contains a value not in another range in Excel

by

To test if a range contains any values (i.e. at least one value) not in another range, you can use the SUMPRODUCT function with MATCH and ISNA.

The MATCH function receives a single lookup value, and returns a single match if any. In this case, however, we are giving MATCH an array for lookup value, so it will return an array of results, one per element in the lookup array.

See example below:

Formula

=SUMPRODUCT(--(ISNA(MATCH(rngA,rngB,0))))>0

Explanation

In the example shown, the formula in F6 is:

=SUMPRODUCT(--(ISNA(MATCH(lista,listb,0))))>0

How the formula works

MATCH is configured for “exact match”. If a match isn’t found, MATCH will return the #N/A error. After match runs, it returns have something like this:

=SUMPRODUCT(--(ISNA({3;5;6;2;#N/A;4})))>0

We take advantage of this by using the ISNA function to test for any #N/A errors.

After ISNA, we have:

=SUMPRODUCT(--({FALSE;FALSE;FALSE;FALSE;TRUE;FALSE}))>0

We use the double negative (double unary) operator to convert TRUE FALSE values to ones and zeros, which gives us this:

=SUMPRODUCT({0;0;0;0;1;0})>0

SUMPRODUCT then sums the elements in the array, and the result is compared to zero for force a TRUE or FALSE result.

 

Post navigation

Previous Post:

How to calculate project complete percentage in Excel

Next Post:

Popularly Used Excel Functions and their examples

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

  • Extract multiple matches into separate rows in Excel
  • IF function: Description, Usage, Syntax, Examples and Explanation
  • IF with wildcards in Excel
  • IFERROR function: Description, Usage, Syntax, Examples and Explanation
  • FALSE function: Description, Usage, Syntax, Examples and Explanation

Date Time

  • How to get Holiday Date from Year in Excel
  • WEEKDAY function: Description, Usage, Syntax, Examples and Explanation
  • Check If Two Dates are same month in Excel
  • Count dates in current month in Excel
  • How to calculate workdays per month in Excel

Grouping

  • Categorize text with keywords in Excel
  • If cell contains one of many things in Excel
  • Running count group by n size in Excel
  • Group times into unequal buckets in Excel
  • How to randomly assign data to groups in Excel

General

  • How to Insert Cells, Row and Rows in Excel
  • 3D SUMIF for multiple worksheets in Excel
  • How to calculate profit margin percentage in Excel
  • How to password protect excel sheet?
  • How to calculate percent change in Excel
© 2026 xlsoffice . All Right Reserved. | Teal Smiles | Abbreviations And Their Meaning