+ Reply to Thread
Results 1 to 4 of 4

Intervals as logical statements

  1. #1
    Registered User
    Join Date
    10-25-2005
    Posts
    1

    Intervals as logical statements

    I'm trying to get Excel to determine whether x<=y<=z is true or false, but it always comes up false when written this way (even if x=1, y=2, and z=3). I finally ended up with a formula that looked like this: =if((and(a2<=b2,b2<=c2)),d2,b2). This worked, but there must be a better way.

  2. #2
    Bob Phillips
    Guest

    Re: Intervals as logical statements

    That is the syntax. What is wrong with conforming to the syntax?

    --

    HTH

    RP
    (remove nothere from the email address if mailing direct)


    "xnadeau" <[email protected]> wrote in
    message news:[email protected]...
    >
    > I'm trying to get Excel to determine whether x<=y<=z is true or false,
    > but it always comes up false when written this way (even if x=1, y=2,
    > and z=3). I finally ended up with a formula that looked like this:
    > =if((and(a2<=b2,b2<=c2)),d2,b2). This worked, but there must be a
    > better way.
    >
    >
    > --
    > xnadeau
    > ------------------------------------------------------------------------
    > xnadeau's Profile:

    http://www.excelforum.com/member.php...o&userid=28335
    > View this thread: http://www.excelforum.com/showthread...hreadid=479146
    >




  3. #3
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,829
    How about the logical function =AND(A2<=B2,B2<=C2) and drop the IF function completely?

  4. #4
    Bob Phillips
    Guest

    Re: Intervals as logical statements

    It gives a different result, TRUE or FALSE, not what is in B2 or D2

    --

    HTH

    RP
    (remove nothere from the email address if mailing direct)


    "MrShorty" <[email protected]> wrote in
    message news:[email protected]...
    >
    > How about the logical function =AND(A2<=B2,B2<=C2) and drop the IF
    > function completely?
    >
    >
    > --
    > MrShorty
    > ------------------------------------------------------------------------
    > MrShorty's Profile:

    http://www.excelforum.com/member.php...o&userid=22181
    > View this thread: http://www.excelforum.com/showthread...hreadid=479146
    >




+ 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