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

Data Analysis

  • How to create a Histogram in Excel
  • Get column name from index in Excel Table
  • How to create running total in an Excel Table
  • How to Use Solver Tool in Excel
  • How to calculate correlation coefficient Correlation in Excel

References

  • How to use Excel TRANSPOSE Function
  • Basic INDEX MATCH approximate in Excel
  • Lookup entire row in Excel
  • Last row number in range
  • How to get address of last cell in range in Excel

Data Validations

  • Data validation must not exist in list
  • Excel Data validation unique values only
  • Excel Data validation specific characters only
  • Excel Data validation number multiple 100
  • Excel Data validation must begin with

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

  • IFS function: Description, Usage, Syntax, Examples and Explanation
  • How to use Excel NOT Function
  • Excel If, Nested If, And/Or Criteria Examples
  • How to use Excel FALSE Function
  • SWITCH function: Description, Usage, Syntax, Examples and Explanation

Date Time

  • Get days, months, and years between dates in Excel
  • Add decimal minutes to time in Excel
  • Pad week numbers with zeros in Excel
  • Convert Excel time to decimal minutes
  • Get fiscal quarter from date in Excel

Grouping

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

General

  • Convert column number to letter in Excel
  • Select, Insert, Rename, Move, Delete Worksheets in Excel
  • Customize Ribbon In Excel
  • Subtotal by color in Excel
  • Excel Autofill Cell Ranges, Copy, Paste
© 2025 xlsoffice . All Right Reserved. | Teal Smiles | Abbreviations And Their Meaning