+ Reply to Thread
Results 1 to 11 of 11

Finding Missing numbers in the attached list

  1. #1
    Registered User
    Join Date
    10-10-2013
    Location
    Wrexham
    MS-Off Ver
    Excel 2002
    Posts
    2

    Finding Missing numbers in the attached list

    Hi all,

    I'm trying to find missing check numbers from the following (attached) list. After trying without success with several formulas I have decided to call for help.

    I am trying to obtain a numerical list of the missing numbers from the list.

    Many Thanks

    Vinny
    Attached Files Attached Files

  2. #2
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Finding Missing numbers in the attached list

    I didn't look at your file...

    See if this helps.

    Data Range
    A
    B
    C
    1
    Numbers
    -----
    Missing
    2
    2
    1
    3
    3
    4
    4
    5
    6
    5
    8
    7
    6
    9
    7
    10
    8

    We have a number sequence from 1 to 10. Some of these numbers are entered in column A. We want to find what numbers are missing from that sequence.

    I see you're using Excel 2002 so this formula is written for that version of Excel.

    Enter this array formula** in C2 and copy down until you get blanks:

    =IF(ISERROR(SMALL(IF(ISNA(MATCH(ROW(INDIRECT("1:10")),A$2:A$10,0)),ROW(INDIRECT("1:10"))),ROWS(C$2:C2))),"",SMALL(IF(ISNA(MATCH(ROW(INDIRECT("1:10")),A$2:A$10,0)),ROW(INDIRECT("1:10"))),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.

    Note that this formula will be very slow to calculate on large number sequences and large data ranges.
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  3. #3
    Forum Guru samba_ravi's Avatar
    Join Date
    07-26-2011
    Location
    Hyderabad, India
    MS-Off Ver
    Excel 2021
    Posts
    8,915

    Re: Finding Missing numbers in the attached list

    see the attached file
    is this not working
    Attached Files Attached Files
    Last edited by samba_ravi; 10-12-2013 at 01:51 AM.

  4. #4
    Registered User
    Join Date
    10-10-2013
    Location
    Wrexham
    MS-Off Ver
    Excel 2002
    Posts
    2

    Re: Finding Missing numbers in the attached list

    Hi all,
    Apologies for being so thick but even with your help I'm still getting either weird errors or blank results.

    The check numbers range from number 56708 to number 67508
    And from rows A2 to A7649

    I have attached my spreadsheet so far given the help of the formula above in the hope that somoene can help.

    Big thanks everyone.

    Vinny
    Attached Files Attached Files

  5. #5
    Forum Expert RobertMika's Avatar
    Join Date
    06-22-2009
    Location
    Haverhill, UK
    MS-Off Ver
    Excel 2003-13
    Posts
    1,530

    Re: Finding Missing numbers in the attached list

    It would be esier if you use VBA:
    http://www.extendoffice.com/document...-sequence.html
    Tony's formula will do the job but will take lot of resources.
    If you are http://www.excelforum.com/image.php?type=sigpic&userid=125481&dateline=1392355029happy with the results, please add to the contributor's
    reputation by clicking the reputation icon (star icon).




    If you are satisfied with the solution(s) provided, please mark your thread as Solved.
    Select Thread Tools-> Mark thread as Solved.
    To undo, select Thread Tools-> Mark thread as Unsolved.
    http://www.excelaris.co.uk

  6. #6
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Finding Missing numbers in the attached list

    If you're using Excel 2007 or later then we can make the formula a bit more efficient but it will still be slow to calculate.

    This array formula** entered in C2 and copied down until you get blanks:

    =IFERROR(SMALL(IF(ISNA(MATCH(ROW($56708:$67508),A$2:A$7649,0)),ROW($56708:$67508)),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.

    The formula will not work correctly if you insert new rows. It's a trade-off between being less robust or more efficient.

    Since the data range is kind of large and the check sequence is also kind of wide I think you'd be better off if you can find a macro to do this.

  7. #7
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,169

    Re: Finding Missing numbers in the attached list

    Hi Vinny and welcome to the forum,

    I did this problem by first sorting your check numbers from lot to high. Then I created a Helper Column that simply subtracted adjacent check numbers. Most of these are equal to 1 as they are next to each other. If it is greater than one then you've skipped a number or two or ....

    I decided to do an Advanced Filter to pull out all those check numbers that had a skip just in front of them. See if this example helps...
    Attached Files Attached Files
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  8. #8
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Finding Missing numbers in the attached list

    Here is a macro I have that will do this.

    I'm kind of hesitant to post VBA code because I'm not much of a programmer so if you need to change this very much I may not be able to figure it out!

    I ran the macro in your posted sample file and it took about 1 second to generate the list of 3373 missing check numbers.

    Please Login or Register  to view this content.

  9. #9
    Forum Guru samba_ravi's Avatar
    Join Date
    07-26-2011
    Location
    Hyderabad, India
    MS-Off Ver
    Excel 2021
    Posts
    8,915

    Re: Finding Missing numbers in the attached list

    find the the attachement
    Attached Files Attached Files

  10. #10
    Forum Contributor
    Join Date
    09-23-2008
    Location
    Mexico
    Posts
    200

    Re: Finding Missing numbers in the attached list


  11. #11
    Valued Forum Contributor
    Join Date
    10-29-2012
    Location
    Mojokerto,Indonesia
    MS-Off Ver
    Excel 2007
    Posts
    554

    Re: Finding Missing numbers in the attached list

    array formula
    =SMALL(IF(ISNUMBER(MATCH(ROW($56768:$67508),$A$2:$A$7649,0)),"",ROW($56768:$67508)),ROW(1:1))

    copy down

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Finding out missing numbers
    By kwfine in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 10-03-2009, 07:29 AM
  2. Finding missing numbers
    By BrettLowers in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 01-25-2008, 03:08 PM
  3. Finding the missing numbers
    By debra in forum Excel General
    Replies: 5
    Last Post: 11-14-2006, 11:47 PM
  4. Help finding missing numbers
    By fuegoman in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 04-03-2005, 07:54 PM
  5. finding missing numbers
    By static69 in forum Excel General
    Replies: 2
    Last Post: 02-05-2005, 08:14 PM

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