Skip to content
xlsoffice. All Rights Reserved
  • Home
  • Excel For Beginners
  • Excel Intermediate
  • Advanced Excel For Experts

Lookup and Reference Examples

  • Multi-criteria lookup and transpose in Excel
  • How to use Excel OFFSET function
  • Approximate match with multiple criteria in Excel
  • Count unique text values with criteria
  • How to get first row number in range in Excel

Data Analysis Examples

  • Data Series in Excel
  • How To Load Analysis ToolPak in Excel
  • Example of COUNTIFS with variable table column in Excel
  • How to combine 2 or more chart types in a single chart in Excel
  • How To Perform and Interpret Regression Analysis in Excel

Data Validation Examples

  • Excel Data validation allow uppercase only
  • Excel Data validation allow weekday only
  • Excel Data validation unique values only
  • Excel Data validation must contain specific text
  • Excel Data validation date in next 30 days

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.

Worked Example:   Lookup entire column in Excel

See example below:

Formula

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

Explanation

In the example shown, the formula in F6 is:

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

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

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

Worked Example:   Weighted average in Excel

After ISNA, we have:

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

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

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

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

Worked Example:   Lookup lowest value in Excel

 

Post navigation

Previous Post:

How to add sequential row numbers to a set of data in Excel

Next Post:

Check if multiple cells have same value with case sensitive 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
  • How to extract substring in Excel
  • SUBSTITUTE function vs REPLACE function in Excel
  • Split dimensions into two parts in Excel Worksheet
  • How to find and replace multiple values at same time in Excel
  • Extract last name from full name — Manipulating NAMES in Excel
  • DAYS360 function: Description, Usage, Syntax, Examples and Explanation
  • How to calculate Next working/business day in Excel
  • Convert decimal minutes to Excel time
  • Get work hours between dates in Excel
  • Display the current date in Excel
  • AMORDEGRC function: Description, Usage, Syntax, Examples and Explanation
  • How to calculate principal for given period in Excel
  • Calculate payment for a loan in Excel
  • How to calculate Net Present Value (NPV) in Excel
  • RRI function: Description, Usage, Syntax, Examples and Explanation
© 2022 xlsoffice . All Right Reserved. | Teal Smiles