+ Reply to Thread
Results 1 to 5 of 5

Value between 2 numbers

  1. #1
    olman
    Guest

    Value between 2 numbers

    I want to compare a number in a cell to a min and max number. If it doesn't
    fall between them it is bad if it does it is good.
    Example: 2.5 is Min. 5 is Max.
    Value is <2.5 or > 5 is "Bad"
    2.5 is "Good", 5 is "Good"
    Any help is appreciated?

  2. #2
    Forum Expert
    Join Date
    12-24-2004
    Location
    Sweden
    Posts
    1,256
    For example, select cell C3 and write
    =IF(AND(A1>=2.5,A1<=5),"Good","Bad")
    A1 contains the value you want to test.

    Ola Sandström


    =IF(AND(A1>=B1,A1<=B2),"Good","Bad")
    B1 is 2.5
    B2 is 5.0

  3. #3
    RagDyer
    Guest

    Re: Value between 2 numbers

    One way:

    =IF(OR(A1<2.5,A1>5),"Bad","Good")

    --
    HTH,

    RD
    ==============================================
    Please keep all correspondence within the Group, so all may benefit!
    ==============================================



    "olman" <[email protected]> wrote in message
    news:[email protected]...
    > I want to compare a number in a cell to a min and max number. If it

    doesn't
    > fall between them it is bad if it does it is good.
    > Example: 2.5 is Min. 5 is Max.
    > Value is <2.5 or > 5 is "Bad"
    > 2.5 is "Good", 5 is "Good"
    > Any help is appreciated?



  4. #4
    David Biddulph
    Guest

    Re: Value between 2 numbers

    "olman" <[email protected]> wrote in message
    news:[email protected]...
    >I want to compare a number in a cell to a min and max number. If it doesn't
    > fall between them it is bad if it does it is good.
    > Example: 2.5 is Min. 5 is Max.
    > Value is <2.5 or > 5 is "Bad"
    > 2.5 is "Good", 5 is "Good"
    > Any help is appreciated?


    =IF(A1<2.5,"Bad",IF(A1>5,"Bad","Good"))
    --
    David Biddulph



  5. #5
    olman
    Guest

    Re: Value between 2 numbers

    Thank you both!

    "David Biddulph" wrote:

    > "olman" <[email protected]> wrote in message
    > news:[email protected]...
    > >I want to compare a number in a cell to a min and max number. If it doesn't
    > > fall between them it is bad if it does it is good.
    > > Example: 2.5 is Min. 5 is Max.
    > > Value is <2.5 or > 5 is "Bad"
    > > 2.5 is "Good", 5 is "Good"
    > > Any help is appreciated?

    >
    > =IF(A1<2.5,"Bad",IF(A1>5,"Bad","Good"))
    > --
    > David Biddulph
    >
    >
    >


+ 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