Identify missing values in two columns using excel formula
Question: I want to find missing numbers in two ranges combined? They are not adjacent.
Answer:
Array formula in B5:B15:
=SMALL(IF(COUNTIF(List1, ROW(INDIRECT(C1&":"&C2)))+COUNTIF(List2, ROW(INDIRECT(C1&":"&C2)))=0, ROW(INDIRECT(C1&":"&C2)), ""), ROW()-ROW(missing_list_start)+1) + CTRL + SHIFT + ENTER
To remove #NUM errors, Excel 2007 users can use this formula:
=IFERROR(SMALL(IF(COUNTIF(List1, ROW(INDIRECT(C1&":"&C2)))+COUNTIF(List2, ROW(INDIRECT(C1&":"&C2)))=0, ROW(INDIRECT(C1&":"&C2)), ""), ROW()-ROW(missing_list_start)+1), "") + CTRL + SHIFT + ENTER
Named ranges
List1 (A2:A6)
List2 (E4:E6)
missing_list_start (B5)
What is named ranges?
How to customize the formula to your excel spreadsheet
Change the named ranges.
Download excel sample file for this tutorial.
missing-values-in-two-columns.xlsx
(Excel 2007 Workbook *.xlsx)
Functions in this article:
COUNTIF(range,criteria)
Counts the number of cells within a range that meet the given condition
INDEX(array,row_num,[column_num])
Returns a value or reference of the cell at the intersection of a particular row and column, in a given range
IF(logical_test;[value_if:true];[value_if_false])
Checks whether a condition is met, and returns one value if TRUE, and another value if FALSE
INDIRECT(ref_text,[a1])
Returns the reference specified by a text string
ROW(reference) returns the rownumber of a reference
SMALL(array,k) Returns the k-th smallest row number in this data set.
IFERROR(value;value_if_error) Returns value_if_error if expression is an error and the value of the expression itself otherwise
Related posts:
- Identify missing values in a column using excel formula
- Extract largest values from two columns using array formula in excel
- Identify missing three character alpha code numbers in excel
- Comparing two columns and sum unique values using array formula in excel
- Merge two columns into one list in excel
- Extract a list of duplicates from two columns combined using array formula in excel
- Merge three columns into one list in excel
- Extract a unique distinct list from two columns using excel 2007 array formula
- Extract a list of duplicates from three columns combined using array formula in excel
- Filter duplicates from two columns combined and sort from A to Z using array formula in excel



September 3rd, 2009 at 1:17 pm
This is great. I need to do exactly the same thing, but with three character alpha codes instead of numbers. Can anyone help?
September 4th, 2009 at 10:17 am
I tried to answer your question in this blog post: http://www.get-digital-help.com/2009/09/04/identify-missing-three-character-alpha-code-numbers-in-excel/