Identifying missing numerical values in a series
Try this array formula**.
Note that this may be "slow" to calculate.
Assume your data is in the range A2:A5000
Array entered** in C2:
=SMALL(IF(ISNA(MATCH(ROW($1001:$9078),A$2:A$5000,0 )),ROW($1001:$9078)),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 start getting #NUM! errors meaning all missing numbers
have been returned.
Also note, this formula is vulnerable to row insertions in certain
locations. If you know for certain that you will never need to insert new
rows then no problem. However, if you might insert new rows then try this
version (still array entered):
=SMALL(IF(ISNA(MATCH(ROW(INDEX(A:A,1001):INDEX(A:A ,9078)),A$2:A$5000,0)),ROW(INDEX(A:A,1001):INDEX(A :A,9078))),ROWS(C$2:C2))
--
Biff
Microsoft Excel MVP
"SiH23" wrote in message
...
In column A I have a series of numbers running from 1001 to 9078. These
numbers run in numerical order, but there are known missing values. For
example, the numbers may run 1000, 1001, 1005. In this instance the
missing
numbers are 1002, 1003 and 1004. It is these missing numbers that I need
to
identify from the column of numbers running from 1001 to 9078. Could these
missing numbers be placed in column C.
Any help would be greatly appreciated.
|