+ Reply to Thread
Results 1 to 4 of 4

Define list of integers in formula

  1. #1
    Registered User
    Join Date
    07-27-2015
    Location
    Aalborg, Denmark
    MS-Off Ver
    Excel 2019
    Posts
    32

    Define list of integers in formula

    Hi everyone

    Does anyone here know how the syntax to make a list of numbers in formula (sorry for the bad english describtion: )

    Lets say I need to make a formula that checks if the value in A1 is for a variable is either 1, 2, 3 or 4.

    My best guess would be something like:

    =If(A1=[1,2,3,4];"Yes";"No")

    But of course it does not work : )

    Can this be done without creating a named range?

    Thanks
    Kr
    Morten

  2. #2
    Forum Expert 63falcondude's Avatar
    Join Date
    08-22-2016
    Location
    USA
    MS-Off Ver
    365
    Posts
    6,266

    Re: Define list of integers in formula

    Try something like this:

    =IF(OR(A1={1,2,3,4}),"Yes","No")

  3. #3
    Registered User
    Join Date
    07-27-2015
    Location
    Aalborg, Denmark
    MS-Off Ver
    Excel 2019
    Posts
    32

    Re: Define list of integers in formula

    Quote Originally Posted by 63falcondude View Post
    Try something like this:

    =IF(OR(A1={1,2,3,4}),"Yes","No")
    Thanks for the reply - it did not work with the "," seperation of integers but I replaced the "," with a ";" and it worked fine!

    Thanks

  4. #4
    Forum Expert 63falcondude's Avatar
    Join Date
    08-22-2016
    Location
    USA
    MS-Off Ver
    365
    Posts
    6,266

    Re: Define list of integers in formula

    Whoops, I should have noticed that our regional settings were different. Glad you were able to fix it.

    Thanks for the rep!

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

+ 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] A list of Consecutive Integers, can I search for missing integers
    By CM in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 09-07-2005, 12:05 AM
  2. A list of Consecutive Integers, can I search for missing integers
    By Harlan Grove in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 09-06-2005, 10:05 PM
  3. [SOLVED] A list of Consecutive Integers, can I search for missing integers
    By Harlan Grove in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 09-06-2005, 05:05 PM
  4. [SOLVED] A list of Consecutive Integers, can I search for missing integers
    By CM in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 04:05 PM
  5. [SOLVED] A list of Consecutive Integers, can I search for missing integers
    By Harlan Grove in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 09-06-2005, 09:05 AM
  6. A list of Consecutive Integers, can I search for missing integers
    By CM in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 07:05 AM
  7. A list of Consecutive Integers, can I search for missing integers
    By CM in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 12:05 AM
  8. [SOLVED] A list of Consecutive Integers, can I search for missing integers
    By CM in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-05-2005, 11:05 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