Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.newusers
mz mz is offline
external usenet poster
 
Posts: 40
Default Combining AND and OR functions

Where would the "OR" go in the following function:

Cell A1 can be Yes or No
Cell A2 can be any number
Cell A3 can be any number

If EITHER Cell A1 is "Yes" OR Cell A2 is equal to or above 50 AND Cell A3 is
equal to or above 100, then return "OK";
however, if cell A1 is "No" AND either A2 is below 50 or A3 is below 100,
then return "No good"

=IF(AND(A2=50,A3=100),"OK","No good")

How would I add the OR term to test whether A1 is Yes or No?
--
MZ
  #2   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 905
Default Combining AND and OR functions

"MZ" wrote:
If EITHER Cell A1 is "Yes" OR Cell A2 is equal
to or above 50 AND Cell A3 is equal to or above
100, then return "OK";
however, if cell A1 is "No" AND either A2 is
below 50 or A3 is below 100, then return "No good"


=IF(OR(A1="yes",AND(A2=50,A3=100)), "OK", "No good")

Alternatively:

=IF((A1="yes")+(A2=50)*(A3=100), "OK", "No good")

I would use the latter (less clear, IMHO) only if the function nesting limit
(7 before Excel 2007) becomes a problem.


----- original message -----

"MZ" wrote:

Where would the "OR" go in the following function:

Cell A1 can be Yes or No
Cell A2 can be any number
Cell A3 can be any number

If EITHER Cell A1 is "Yes" OR Cell A2 is equal to or above 50 AND Cell A3 is
equal to or above 100, then return "OK";
however, if cell A1 is "No" AND either A2 is below 50 or A3 is below 100,
then return "No good"

=IF(AND(A2=50,A3=100),"OK","No good")

How would I add the OR term to test whether A1 is Yes or No?
--
MZ

Reply
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
combining functions Maggie Excel Discussion (Misc queries) 2 August 24th 09 11:44 PM
combining IF OR Functions kevan Excel Worksheet Functions 4 November 10th 08 03:14 AM
combining IF, AND, and OR Functions Hillary: needing some help[_2_] Excel Worksheet Functions 5 October 9th 08 04:37 PM
Combining IF OR and AND functions andyp161 Excel Worksheet Functions 3 April 20th 06 06:05 PM
Combining functions Steve Excel Worksheet Functions 2 March 31st 06 05:49 PM


All times are GMT +1. The time now is 08:41 AM.

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

About Us

"It's about Microsoft Excel"