Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 21
Default Lookup missing number(s) in column w/blanks & duplicates

I am hoping someone can help construct some kind of Lookup+Find/Match formula
to check a column of numbers using a constant array provided e.g.
{1,2,3,4,5,6,7,8} and return the numbers in the column that are missing (if
any). The will be duplicate numbers and blanks, but I want to find out if any
of the numbers in the 1-8 array do not appear at all in the column. Numbers
may vary by column but will be no greater than 8, i.e. col.B: 1-5, col.C:
1-7. For the example below the results should be: Col.A is missing numbers 4
& 7; Col.B is missing number 3; Col.C is missing number 1. Unfortunately I
have no idea how to make this happen. I would greatly appreciate any
responses to help. Thank you!
A B C
2 1 3
2 4
8 7
2 4
3 1 2
1 5 5
6 7
5 6

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Lookup missing number(s) in column w/blanks & duplicates

Try this...

Create this defined name...

Goto the menu InsertNameDefine
Name: Nums
Refers to: =ROW(INDIRECT("1:8"))
OK

Then, assume your numbers are in the range A2:A9.

Enter this array formula** in say, C2:

=SMALL(IF(ISNA(MATCH(Nums,A$2:A$9,0)),Nums),ROWS(C $2:C2))

** array formulas need to be entered using the key combination of
CTRL,SHIFT,ENTER (not just ENTER). Hold down both the CTRL key and the SHIFT
key then hit ENTER.

Copy down until you get #NUM! errors meaning all missing numbers have be
returned.

--
Biff
Microsoft Excel MVP


"Excel-User-RR" wrote in message
...
I am hoping someone can help construct some kind of Lookup+Find/Match
formula
to check a column of numbers using a constant array provided e.g.
{1,2,3,4,5,6,7,8} and return the numbers in the column that are missing
(if
any). The will be duplicate numbers and blanks, but I want to find out if
any
of the numbers in the 1-8 array do not appear at all in the column.
Numbers
may vary by column but will be no greater than 8, i.e. col.B: 1-5, col.C:
1-7. For the example below the results should be: Col.A is missing numbers
4
& 7; Col.B is missing number 3; Col.C is missing number 1. Unfortunately I
have no idea how to make this happen. I would greatly appreciate any
responses to help. Thank you!
A B C
2 1 3
2 4
8 7
2 4
3 1 2
1 5 5
6 7
5 6



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 21
Default Lookup missing number(s) in column w/blanks & duplicates

Thanks Biff, the suggestion works great. I made a slight modification to it
because some columns are 1-8, some are 1-6, some 1-5 etc. So I made a
separate defined name for each one that I needed, i.e. - Nums4, Nums5, Nums6,
Nums8. If you have a better suggestion to handle this difference, I would
definitely like to see it; otherwise I am happy will the answer as it is.
Thanks!

"T. Valko" wrote:

Try this...

Create this defined name...

Goto the menu InsertNameDefine
Name: Nums
Refers to: =ROW(INDIRECT("1:8"))
OK

Then, assume your numbers are in the range A2:A9.

Enter this array formula** in say, C2:

=SMALL(IF(ISNA(MATCH(Nums,A$2:A$9,0)),Nums),ROWS(C $2:C2))

** array formulas need to be entered using the key combination of
CTRL,SHIFT,ENTER (not just ENTER). Hold down both the CTRL key and the SHIFT
key then hit ENTER.

Copy down until you get #NUM! errors meaning all missing numbers have be
returned.

--
Biff
Microsoft Excel MVP


"Excel-User-RR" wrote in message
...
I am hoping someone can help construct some kind of Lookup+Find/Match
formula
to check a column of numbers using a constant array provided e.g.
{1,2,3,4,5,6,7,8} and return the numbers in the column that are missing
(if
any). The will be duplicate numbers and blanks, but I want to find out if
any
of the numbers in the 1-8 array do not appear at all in the column.
Numbers
may vary by column but will be no greater than 8, i.e. col.B: 1-5, col.C:
1-7. For the example below the results should be: Col.A is missing numbers
4
& 7; Col.B is missing number 3; Col.C is missing number 1. Unfortunately I
have no idea how to make this happen. I would greatly appreciate any
responses to help. Thank you!
A B C
2 1 3
2 4
8 7
2 4
3 1 2
1 5 5
6 7
5 6




  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Lookup missing number(s) in column w/blanks & duplicates

What you did is about the best way to do it.

Thanks for the feedback!

--
Biff
Microsoft Excel MVP


"Excel-User-RR" wrote in message
...
Thanks Biff, the suggestion works great. I made a slight modification to
it
because some columns are 1-8, some are 1-6, some 1-5 etc. So I made a
separate defined name for each one that I needed, i.e. - Nums4, Nums5,
Nums6,
Nums8. If you have a better suggestion to handle this difference, I would
definitely like to see it; otherwise I am happy will the answer as it is.
Thanks!

"T. Valko" wrote:

Try this...

Create this defined name...

Goto the menu InsertNameDefine
Name: Nums
Refers to: =ROW(INDIRECT("1:8"))
OK

Then, assume your numbers are in the range A2:A9.

Enter this array formula** in say, C2:

=SMALL(IF(ISNA(MATCH(Nums,A$2:A$9,0)),Nums),ROWS(C $2:C2))

** array formulas need to be entered using the key combination of
CTRL,SHIFT,ENTER (not just ENTER). Hold down both the CTRL key and the
SHIFT
key then hit ENTER.

Copy down until you get #NUM! errors meaning all missing numbers have be
returned.

--
Biff
Microsoft Excel MVP


"Excel-User-RR" wrote in message
...
I am hoping someone can help construct some kind of Lookup+Find/Match
formula
to check a column of numbers using a constant array provided e.g.
{1,2,3,4,5,6,7,8} and return the numbers in the column that are missing
(if
any). The will be duplicate numbers and blanks, but I want to find out
if
any
of the numbers in the 1-8 array do not appear at all in the column.
Numbers
may vary by column but will be no greater than 8, i.e. col.B: 1-5,
col.C:
1-7. For the example below the results should be: Col.A is missing
numbers
4
& 7; Col.B is missing number 3; Col.C is missing number 1.
Unfortunately I
have no idea how to make this happen. I would greatly appreciate any
responses to help. Thank you!
A B C
2 1 3
2 4
8 7
2 4
3 1 2
1 5 5
6 7
5 6






Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Find missing numbers in list, ignore duplicates Galceran Excel Discussion (Misc queries) 0 October 30th 07 05:05 PM
Find Column Number via Lookup Ryan[_2_] Excel Worksheet Functions 4 May 18th 07 03:07 PM
2 rows, highest No in row 1, then highest number in row 2 relating to that column, possible duplicates John Excel Worksheet Functions 3 August 11th 06 04:34 AM
Display missing Part Number if Column A does not match column B Erik T Excel Worksheet Functions 2 April 17th 06 11:23 PM
Count number of unique items in a column that contains duplicates Steembeem Excel Worksheet Functions 3 February 2nd 05 12:51 AM


All times are GMT +1. The time now is 09:57 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"