LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,651
Default Logical Functions

And of course if you look at Ron's =OR(n1,n<4,n949,n<991) you'll realise
that if you've tested for n1, there's no point in checking for n949, and
similarly if you've tested for n<991 there's no point in testing for n<4,
hence you can simplify to =OR(n1,n<991), but then look further so if you
don't satisfy n1 you must satisfy n<=1 and must therefore satisfy n<991, so
the answer to the OR function is always TRUE.

Hence, as Ron says, you need to think first about what it is that you're
trying to do. When you've sorted out precisely what the question is,
getting Excel to answer it is usually the easy part.
--
David Biddulph

"Ron Rosenfeld" wrote in message
...
You need to express what you want more clearly -- then you might find
logical
functions easier.

You don't say if you want the number to meet all of the criteria, or any
of the
criteria, or perhaps some pairs of the criteria.

There is no way a number can meet all those criteria simultaneously. So
if
that's what you want, the formula is: 0

Also, your statement and formula disagree as to what you want to do with
regard
to the number 1. Your statement is "number is greater than 1", whereas
your
formula reads G70.

If you want a 1 if the number meets any one of those criteria, then you
need
the OR function which will return a TRUE/FALSE if the number is:

greater than 1 OR
less than 4 OR
greater than 949 OR
less than 991

In other words, if the number meets and one of the criteria.

=OR(n1,n<4,n949,n<991)

IF you want a 1 or 0, you can just convert TRUE/FALSE to a number:

=--OR(n1,n<4,n949,n<991)

or use an IF statement:

=IF(OR(n1,n<4,n949,n<991),1,0)

IF you want something else, you need to be clear. And I believe that
being
clear in your own head, will help with your difficulties with logical
functions.


On Tue, 19 Feb 2008 08:28:00 -0800, saltnsnails
wrote:

I must admit. I am horrible at logical functions. I am trying to compose
a
formula that will return a value of "1" if number is greater than 1, less
than 4, greater than 949, and less than 991. Here is what I have now but
it
is not working: =IF(AND(G70,G7<4,G7949,G7<991),1,0)

Any help would be awesome!





 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Logical Functions Eden397 Excel Worksheet Functions 3 June 11th 07 04:08 PM
Logical Functions Eden397 Excel Worksheet Functions 10 June 11th 07 04:06 PM
logical functions Ali Akbar Excel Worksheet Functions 3 February 11th 07 08:00 PM
using logical functions civilized_engr Excel Worksheet Functions 3 June 10th 06 05:41 PM
logical functions wiz546 Excel Worksheet Functions 1 February 1st 05 03:02 AM


All times are GMT +1. The time now is 10:38 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"