+ Reply to Thread
Results 1 to 14 of 14

List missing numbers in range (not as an array forumla)

  1. #1
    Registered User
    Join Date
    10-15-2018
    Location
    London, England
    MS-Off Ver
    365
    Posts
    75

    List missing numbers in range (not as an array forumla)

    Hi Everyone,

    I have an array formula that lists numbers missing from a range, although as I have a need for 100,000 of these formula which will be included in nested IF's, I need a non-array formla to do the same job.

    I have attached an example workbook showing the exisiting array formula.

    Any help will be greatly appreciated.
    Attached Files Attached Files
    Last edited by 77highland; 11-09-2023 at 10:02 AM. Reason: added attachment

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,869

    Re: List missing numbers in range (not as an array forumla)

    Are you still using Excel 2016?
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Registered User
    Join Date
    10-15-2018
    Location
    London, England
    MS-Off Ver
    365
    Posts
    75

    Re: List missing numbers in range (not as an array forumla)

    Hi AliGW, I am using 365 (have just updated my profile to reflect)

  4. #4
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,869

    Re: List missing numbers in range (not as an array forumla)

    Then you can use this:

    =LET(v,SORT(VSTACK(D3:D12,E3:E12)),FILTER(B3:B22,ISNA(VLOOKUP(B3:B22,v,1,0))))

    although as I have a need for 100,000 of these formula which will be included in nested IF's
    Rarely required - we could probably help to improve the approach that currently requires this.
    Attached Files Attached Files
    Last edited by AliGW; 11-09-2023 at 10:13 AM.

  5. #5
    Forum Guru HansDouwe's Avatar
    Join Date
    06-21-2022
    Location
    Nederland
    MS-Off Ver
    365 V2403 (Build 17330.20000)
    Posts
    6,428

    Re: List missing numbers in range (not as an array forumla)

    If you are updated to Excel 2021 or 365, please emtpy all cells F3:F12 and try in F3:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Attached Files Attached Files

  6. #6
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,080

    Re: List missing numbers in range (not as an array forumla)

    Another option
    Formula: copy to clipboard
    Please Login or Register  to view this content.

  7. #7
    Forum Guru HansDouwe's Avatar
    Join Date
    06-21-2022
    Location
    Nederland
    MS-Off Ver
    365 V2403 (Build 17330.20000)
    Posts
    6,428

    Re: List missing numbers in range (not as an array forumla)

    Very nice solution Fluff!

  8. #8
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,080

    Re: List missing numbers in range (not as an array forumla)

    Thanks for that & the Rep.

  9. #9
    Registered User
    Join Date
    10-15-2018
    Location
    London, England
    MS-Off Ver
    365
    Posts
    75

    Re: List missing numbers in range (not as an array forumla)

    All solutions worked perfectl. Thank you all very much.

    Rep added for all and thread marked assolved

  10. #10
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,869

    Re: List missing numbers in range (not as an array forumla)

    Glad to have helped.

  11. #11
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,080

    Re: List missing numbers in range (not as an array forumla)

    You're welcome & thanks for the feedback.

  12. #12
    Registered User
    Join Date
    11-03-2023
    Location
    Tucuman, Argentina
    MS-Off Ver
    365
    Posts
    23

    Re: List missing numbers in range (not as an array forumla)

    If efficiency is what you want you could do it with Power Query.

    Build a table from "Production Task #", another one from "Production Line1 and Production Line 2".

    Add them both to power query in the data tab, "From table or range".

    The in power query editor you will see 2 queries. The one from "Production Task #" which you'll leave as is. And another from the Production line 1 and 2 table.
    Right click this second query and duplicate.
    Then on the first remove the second column (p. line 2). And rename the remaining column to "Task". And rename the query to "ProductionLine1" (for example).
    Then on the duplicated query remove the first column (p. line 1), and rename the remaining column also to "Task". And rename the query to "ProductionLine2".
    The select the "ProductionLine1" query and go to the menu "Combine/append queries to create a new one" (from the dropdown menu).
    Select ProductionLine1 and ProductionLine2.
    A new query will be created which you can rename to "AttendedTasks" for example. This list contains all the tasks done by p.line 1 and 2.
    Then select the first query "ProductionTask#" and go to menu "Merge Queries to create a new one".
    In the query selection window you leave "ProductionTask#" in the first and select "AttendedTasks" on the second. The you have to click the column header of both example data to tell power query which column it should use to make the join. As you have only one column in each table there isn't much choice.
    Then in Join Kind select "Left Anti (rows only in first)" (second option from the bottom), and click ok.
    This new query will have all the numbers you need, which are in Production Tasks but not in p.line1 or 2.
    Rename the first column to "Production Line 3".
    After this go to Close & Load.
    One new page will be created for eath query by default. Just delete the pages you don't need.
    You can move or cut and paste the result query (Production line 3) table where you need it.

    I just noticed that you where missing the task number 19 in your array formula solution.

    Good thing about having data in tables, is that as you add new data al queries are updated, you just have to click "Update All" in Data tab.
    Attached Files Attached Files

  13. #13
    Forum Guru HansDouwe's Avatar
    Join Date
    06-21-2022
    Location
    Nederland
    MS-Off Ver
    365 V2403 (Build 17330.20000)
    Posts
    6,428

    Re: List missing numbers in range (not as an array forumla)

    You are Welcome!

    Thanks for the feedback and rep . Glad to have have helped.

  14. #14
    Forum Guru
    Join Date
    04-23-2012
    Location
    New Jersey, USA
    MS-Off Ver
    Excel 365
    Posts
    2,410

    Re: List missing numbers in range (not as an array forumla)

    One more formula for the mix...

    =SORT(UNIQUE(VSTACK(B3:B22,TOCOL(D3:E12,1)),,1))

+ 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. Replies: 2
    Last Post: 06-01-2022, 12:18 PM
  2. List Missing Numbers Without array formula
    By PaulaGon in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 03-04-2019, 08:11 AM
  3. [SOLVED] VBA Evaluate Array then imput into range adjusting forumla in Array down with the Range
    By fireguy7 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-11-2019, 03:40 PM
  4. [SOLVED] Data Validation List from UDF as array - range of numbers
    By jaryszek in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 11-17-2018, 09:29 AM
  5. [SOLVED] Find missing numbers in unsorted list of numbers
    By YasserKhalil in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 06-01-2015, 05:15 AM
  6. Multiple Non-Consecutive Cell Range in an Array Forumla
    By PJC83 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-23-2015, 09:02 AM
  7. Adding a date range to an already complex index array forumla
    By jackifizzle in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 12-05-2013, 11:50 AM

Tags for this Thread

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