+ Reply to Thread
Results 1 to 4 of 4

Deriving list of missing serial numbers

  1. #1
    Registered User
    Join Date
    04-13-2010
    Location
    india
    MS-Off Ver
    Excel 2003
    Posts
    3

    Deriving list of missing serial numbers

    Hi. I have an inventory of items numbered 1-1000. A physical verification was done and the serial numbers of the items found present were noted. I have entered the list into excel and used sort command to arrange in ascending order.

    Is there a way to formulate a second column having a list of the serial numbers of missing items. In essence the list has to be derived from '1-1000' minus the first column.

    Thanks in anticipation.

  2. #2
    Registered User
    Join Date
    04-13-2010
    Location
    india
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: Deriving list of missing serial numbers

    I have found one working solution by going through other posts. But it involves creation of two extra columns. The solution involves using ISNUMBER and MATCH functions.

    Column A = Serial numbers found present
    Column B = Written list of numbers 1 to 1000
    Column C = Formula =ISNUMBER(MATCH(B2,$A$2:$A$1001,0)) and dragged down over column
    Column D = Formula =IF(C2=TRUE,"",B2) and dragged down

    Column D output gives the numbers missing in the column A array.


    Is there a better method possible?

  3. #3
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Deriving list of missing serial numbers

    The way you have done it (helpers) is the optimal approach I would say if not necessarily as elegant as you would like...

    You could if preferred get rid of D and just use C and given you say A is sorted you could use a slightly more efficient approach:

    C2: =IF(LOOKUP(B2,$A$2:$A$1001)=B2,"",B2)
    copied down

    You can do without helpers using Arrays but it wouldn't be (anywhere near) as efficient as the above.

  4. #4
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Deriving list of missing serial numbers

    I should add - that by Array I meant in terms of returning the list in order and without gaps.

    If you were happy to have the gaps you could forgo the helper column B and just use:

    B2: =IF(LOOKUP(ROWS(B$2:B2),$A$2:$A$1001)=ROWS(B$2:B2),"",ROWS(B$2:B2))
    copied down to B1001

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1