+ Reply to Thread
Results 1 to 6 of 6

Numbers which aren't

  1. #1
    Registered User
    Join Date
    05-02-2007
    Posts
    6

    Numbers which aren't

    In many cells there are numbers which can be in range from 1 to 100 (I don't know how you call them in english, but these nubers are whole, natural numbers, not decimal). Some of the numbers can show up in more than one cell, some of them are only in one cell, and some of them maybe aren't in any cell. How can I get an information from Excel which of numbers in mentioned range are NOT in any cell?

  2. #2
    Forum Expert sweep's Avatar
    Join Date
    04-03-2007
    Location
    Great Sankey, Warrington, UK
    MS-Off Ver
    2003 / 2007 / 2010 / 2016 / 365
    Posts
    3,454
    Hi,

    This code will tell you which numbers between 1 and 100 aren't present

    Please Login or Register  to view this content.
    Rule 1: Never merge cells
    Rule 2: See rule 1

    "Tomorrow I'm going to be famous. All I need is a tennis racket and a hat".

  3. #3
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    Microsoft 365
    Posts
    14,719
    A formula approach.....

    If your range of numbers is B1:C200 then to list all integers between 1 and 100 that don't appear anywhere in that range enter this formula in E1

    Please Login or Register  to view this content.
    confirm with CTRL+SHIFT+ENTER and copy down column

    Note: to confirm with CTRL+SHIFT+ENTER select cell with formula, press F2 then hold down CTRL and SHIFT keys and at the same time press ENTER. Curly braces like { and } will appear around the formula in the formula bar

  4. #4
    Registered User
    Join Date
    05-02-2007
    Posts
    6
    About the first solution, where exactly I have to write this code? (This is why I put this problem in the category "new users" - because I am not an expert in Excel, or to be more precise, I am a beginner.) I tried second solution, but I get message on some error.

  5. #5
    Forum Expert sweep's Avatar
    Join Date
    04-03-2007
    Location
    Great Sankey, Warrington, UK
    MS-Off Ver
    2003 / 2007 / 2010 / 2016 / 365
    Posts
    3,454
    OK,

    Press ALT+F11 (this opens the VBA environment)

    Press F7 (this opens the worksheet code)

    paste the code, then close the window


    In excel, go to Tools > Macro > Run Macro (or ALT+F8) and select "absentnumbers", then press OK

  6. #6
    Registered User
    Join Date
    05-02-2007
    Posts
    6
    Great, it really works! Thanks a lot, you are the best!

+ 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