KRK
Guest
Posts: n/a

 16th Mar 2009
Hello,

What does the logical expression (A1<A2<A3<A4) return ?

How is the expression evaluated ?

I've tried various numbers in A1....A4, but cannot seem to make sense of
what the expression is doing ?

Thanks

KK

KRK
Guest
Posts: n/a

 16th Mar 2009

"KRK" <(E-Mail Removed)> wrote in message
news:ONCF%(E-Mail Removed)...
> Hello,
>
> What does the logical expression (A1<A2<A3<A4) return ?
>
> How is the expression evaluated ?
>
> I've tried various numbers in A1....A4, but cannot seem to make sense of
> what the expression is doing ?
>
>
> Thanks
>
> KK

For example, the expression (1<2<3) evaluates to FALSE (though it would
appear to be true, and (1>2>3) evaluates to TRUE, though it would seem to be
false.

K

Gary''s Student
Guest
Posts: n/a

 16th Mar 2009
You may be slightly backwards:
1<2<3
since clearly 2 is greater than 3 this is the same as:
1<1
which is false.

Since 1 cannot be less than either 0 or 1, this type of statement is ALWAYS
false.

--
Gary''s Student - gsnu200839

"KRK" wrote:

>
> "KRK" <(E-Mail Removed)> wrote in message
> news:ONCF%(E-Mail Removed)...
> > Hello,
> >
> > What does the logical expression (A1<A2<A3<A4) return ?
> >
> > How is the expression evaluated ?
> >
> > I've tried various numbers in A1....A4, but cannot seem to make sense of
> > what the expression is doing ?
> >
> >
> > Thanks
> >
> > KK

>
>
> For example, the expression (1<2<3) evaluates to FALSE (though it would
> appear to be true, and (1>2>3) evaluates to TRUE, though it would seem to be
> false.
>
> K
>
>

Shane Devenshire
Guest
Posts: n/a

 16th Mar 2009
Hi,

Here is what is going on:

Excel starts on the left and evaluates 1<2 which is TRUE, next it evalueates
TRUE<3 and returns FALSE. It never evaluates 2<3 in this example.

--
If this helps, please click the Yes button.

Cheers,
Shane Devenshire

"KRK" wrote:

>
> "KRK" <(E-Mail Removed)> wrote in message
> news:ONCF%(E-Mail Removed)...
> > Hello,
> >
> > What does the logical expression (A1<A2<A3<A4) return ?
> >
> > How is the expression evaluated ?
> >
> > I've tried various numbers in A1....A4, but cannot seem to make sense of
> > what the expression is doing ?
> >
> >
> > Thanks
> >
> > KK

>
>
> For example, the expression (1<2<3) evaluates to FALSE (though it would
> appear to be true, and (1>2>3) evaluates to TRUE, though it would seem to be
> false.
>
> K
>
>

joeu2004
Guest
Posts: n/a

 17th Mar 2009
On Mar 16, 6:07*am, "KRK" <tre...@yeleek.nospam.freeserve.co.uk>
wrote:
> > What does the logical expression *(A1<A2<A3<A4) return ?

> [....]
> For example, the expression (1<2<3) evaluates to FALSE
> (though it would appear to be true, and (1>2>3) evaluates
> to TRUE, though it would seem to be false.

I suspect the logical expression you want is:

AND(A1<A2,A2<A3,A3<A4)

Alternatively:

(A1<A2)*(A2<A3)*(A3<A4)

KRK
Guest
Posts: n/a

 19th Mar 2009
Shane,

OK thanks but...In that case why does 1>2>3 return TRUE ?.

1>2 is FALSE,

giving FALSE>3

= TRUE ?????

why is FALSE>3 True ?

Sorry I must be daft I don't understand. What are the 'number values' of
TRUE and FALSE ??

K

"Shane Devenshire" <(E-Mail Removed)> wrote in message
news:9F6C6B89-5CEB-4733-9FCA-(E-Mail Removed)...
> Hi,
>
> Here is what is going on:
>
> Suppose =1<2<3 is your formula
>
> Excel starts on the left and evaluates 1<2 which is TRUE, next it
> evalueates
> TRUE<3 and returns FALSE. It never evaluates 2<3 in this example.
>
> --
> If this helps, please click the Yes button.
>
> Cheers,
> Shane Devenshire
>
>
> "KRK" wrote:
>
>>
>> "KRK" <(E-Mail Removed)> wrote in message
>> news:ONCF%(E-Mail Removed)...
>> > Hello,
>> >
>> > What does the logical expression (A1<A2<A3<A4) return ?
>> >
>> > How is the expression evaluated ?
>> >
>> > I've tried various numbers in A1....A4, but cannot seem to make sense
>> > of
>> > what the expression is doing ?
>> >
>> >
>> > Thanks
>> >
>> > KK

>>
>>
>> For example, the expression (1<2<3) evaluates to FALSE (though it would
>> appear to be true, and (1>2>3) evaluates to TRUE, though it would seem to
>> be
>> false.
>>
>> K
>>
>>

KRK
Guest
Posts: n/a

 19th Mar 2009
Hi, Thanks, yes I agree, that is where I started.

But I was surprised to find that the boolean (a1<a2<a3<a4) actually gives an
answer (rather than causing an error) and if I could understand how it
worked it might be a more elegant way of doing the job.

KK

"joeu2004" <(E-Mail Removed)> wrote in message
news:044f3b69-d4a1-4b5c-aa43-(E-Mail Removed)...
On Mar 16, 6:07 am, "KRK" <tre...@yeleek.nospam.freeserve.co.uk>
wrote:
> > What does the logical expression (A1<A2<A3<A4) return ?

> [....]
> For example, the expression (1<2<3) evaluates to FALSE
> (though it would appear to be true, and (1>2>3) evaluates
> to TRUE, though it would seem to be false.

I suspect the logical expression you want is:

AND(A1<A2,A2<A3,A3<A4)

Alternatively:

(A1<A2)*(A2<A3)*(A3<A4)

joeu2004
Guest
Posts: n/a

 19th Mar 2009
On Mar 19, 4:45*am, "KRK" <tre...@yeleek.nospam.freeserve.co.uk>
wrote:
> why does 1>2>3 return TRUE ?.
> 1>2 is FALSE, giving FALSE>3
> = TRUE ?????
> why is FALSE>3 True ?
>
> Sorry I must be daft I don't understand. What are the
> 'number values' of TRUE and FALSE ??

If we convert the logic values TRUE and FALSE to numeric values (e.g.
--(A1>A2)), we get 1 and 0 respectively.

But apparently, the reverse is not true. Try computing =(A1=FALSE)
and =(A1=TRUE), where A1 is any numeric or text value. The result is
always FALSE. And only TRUE>FALSE, FALSE<TRUE, TRUE=TRUE and
FALSE=FALSE are TRUE.

Apparently, we can only meaningfully compare logic values with other
logic values.

 Thread Tools Rate This Thread Rate This Thread: 5 : Excellent 4 : Good 3 : Average 2 : Bad 1 : Terrible

 Posting Rules You may not post new threads You may not post replies You may not post attachments You may not edit your posts BB code is On Smilies are On [IMG] code is On HTML code is OffTrackbacks are On Pingbacks are On Refbacks are Off Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post ECH123 Microsoft Excel Worksheet Functions 6 11th May 2009 04:14 PM ECH123 Microsoft Excel Worksheet Functions 0 11th May 2009 10:22 AM =?Utf-8?B?MmRvZ3M=?= Windows XP General 6 4th Oct 2005 12:19 PM =?Utf-8?B?MmRvZ3M=?= Windows XP Basics 6 3rd Oct 2005 11:35 PM =?Utf-8?B?UmFuZHk=?= Microsoft Access Macros 2 17th May 2004 07:16 PM

Features