"Lynne" <(E-Mail Removed)> wrote
> .. My first client number starts with
> 001,002,004.........456,457,459,461.....
> .....I am missing numbers in between so I need to know
> what formula to use or how to run a query to
> find the unused numbers to asign them to new clients.
> > .. I have a series of client account numbers that range from 001-999.
Think your client numbers are probably text numbers
Assume the text client numbers are listed in A1 down, eg:
002
003
007
015
016
019
etc
(the client numbers listed in col A can be unsorted)
Assume the max client number issuable for the numbers listed in col A is
say: 1000 (this number must be known)
Using 2 empty cols to the right, eg cols E and F
Put in E1, and array-enter** the formula by pressing CTRL+SHIFT+ENTER
(instead of just pressing ENTER):
=IF(ISNUMBER(MATCH(ROW(),$A$1:$A$1000+0,0)),"",ROW())
The range A1:A1000 corresponds to the full assumed range size of 1000. Adapt
the range to suit the max client number issuable. The "+0" in the part:
$A$1:$A$1000+0 is to coerce the text numbers in col A to real numbers for
the purpose.
**In the formula bar, look for the curly braces: { } around the formula
which Excel will insert upon correct array-entering. If you don't see the
curly braces, then it hasn't been correctly array entered. If so, click
inside the formula bar, and try it again (press CTRL+SHIFT+ENTER).
Then place in F1, press ENTER will do:
=IF(ROW(A1)>COUNT(E:E),"",INDEX(E:E,SMALL(E:E,ROW(A1)))-1)
Format F1 as Custom, type: 000
Select E1:F1, copy down to F1000.
All the unused / missing client numbers will be extracted at the top in col
F.
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---