View Single Post
  #10   Report Post  
Posted to microsoft.public.excel.misc
T. Valko T. Valko is offline
external usenet poster
 
Posts: 15,768
Default Find missing numbers in a list

Here's another one:

Assume numbers are in the range A1:A100 (can include text and empty cells,
won't affect the formula)

Enter this array formula** in B1 and copy down until you get errors:

=SMALL(IF(ISNA(MATCH(ROW($1:$999),A$1:A$100,0)),RO W($1:$999)),ROWS($1:1))

With an error trap:

=IF(ROWS($1:1)<=999-COUNT(A$1:A$100),SMALL(IF(ISNA(MATCH(ROW($1:$999), A$1:A$100,0)),ROW($1:$999)),ROWS($1:1)),"")

As my buddy Max would say, returns all missing numbers neatly bunched at the
top. <g

** array formulas need to be entered using the key combination of
CTRL,SHIFT,ENTER (not just ENTER)

--
Biff
Microsoft Excel MVP


"contar" wrote in message
...
I have a list of numbers with many missing .
ie 1,2,5,6,9,10, up to 999
Need to have a list of the missing numbers
ie 3, 4, 7, 8 etc
All help welcome.