+ Reply to Thread
Results 1 to 7 of 7

Determine if an integer is not in a list

  1. #1
    Valued Forum Contributor ImranBhatti's Avatar
    Join Date
    03-27-2014
    Location
    Rawalpindi,Pakistan
    MS-Off Ver
    Office 365
    Posts
    1,784

    Determine if an integer is not in a list

    Hi,

    To be more concise

    is it possible to determine if an integer is not in a list of integers just like the string as bellow

    [!def] a character that is not d,e or f
    I want
    [!676777] an integer that is not 6,7,67 or 77
    I want to avoid a loop on
    array(6,7,67,77)
    Help would be greatly appreciated


    Imran Bhatti
    Teach me Excel VBA

  2. #2
    Forum Expert
    Join Date
    12-24-2007
    Location
    Alsace - France
    MS-Off Ver
    MS 365 Office Suite
    Posts
    5,066

    Re: Determine if an integer is not in a list

    Perhaps
    C3 = the number to check
    F3 = the list of numbers, starting and finishing by , e.g. ,6,7,67,77,
    Somewhere =NOT(LEN(SUBSTITUTE(F3,"," & C3 & ",",""))=LEN(F3))
    - Battle without fear gives no glory - Just try

  3. #3
    Forum Expert
    Join Date
    12-24-2007
    Location
    Alsace - France
    MS-Off Ver
    MS 365 Office Suite
    Posts
    5,066

    Re: Determine if an integer is not in a list

    With UDF
    Please Login or Register  to view this content.

  4. #4
    Valued Forum Contributor ImranBhatti's Avatar
    Join Date
    03-27-2014
    Location
    Rawalpindi,Pakistan
    MS-Off Ver
    Office 365
    Posts
    1,784

    Re: Determine if an integer is not in a list

    Hi PCI

    Thanks for the review. I will let you know about the output of your function once I am on the PC where the file containing string exists.

    Thanks once again for the efforts to help out.

  5. #5
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,525

    Re: Determine if an integer is not in a list

    Please Login or Register  to view this content.

  6. #6
    Valued Forum Contributor ImranBhatti's Avatar
    Join Date
    03-27-2014
    Location
    Rawalpindi,Pakistan
    MS-Off Ver
    Office 365
    Posts
    1,784

    Re: Determine if an integer is not in a list

    jindon and PCI first of all my apologies for too late response. I was on sick leaves.

    PCI would you please correct me if I am not using your udf correctly? because it is producing "Error 13, Type mismatch"
    Please Login or Register  to view this content.
    Jindon's function is working as I needed (Thank so much jindon)

  7. #7
    Forum Expert
    Join Date
    12-24-2007
    Location
    Alsace - France
    MS-Off Ver
    MS 365 Office Suite
    Posts
    5,066

    Re: Determine if an integer is not in a list

    The input list must be a string ..... not the roght input it seems ...!

    Please Login or Register  to view this content.

+ 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. [SOLVED] How to determine if the user input a STRING or an INTEGER?
    By mcmunoz in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 08-26-2013, 10:32 PM
  2. Determine person's age as an integer
    By jamesoc79 in forum Excel General
    Replies: 3
    Last Post: 05-14-2009, 04:22 PM
  3. How to determine the height of a Range as an Integer
    By TechWrangler in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 05-09-2006, 09:40 AM
  4. What function to determine the second small integer from a list?
    By Eric in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 01-04-2006, 01:10 PM
  5. [SOLVED] What function to determine the second small integer from a list?
    By Eric in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 12-30-2005, 08:00 PM
  6. Replies: 1
    Last Post: 12-30-2005, 10:10 AM
  7. Determine if Integer is Odd or Even
    By GoFigure in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 12-13-2005, 11:15 AM

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