Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
lschuh
 
Posts: n/a
Default using multiple conditions

I would like to know how to write the syntax to test for
1. age44 or 2. Seniority is 9 and by determining the answer to that
3. Arsenic exposure 4.9
4. Cadmium exposure 2.4

If 1. is true or 2. true then I need to check 3. and 4.
if 1. is true or 2. is true and 3 and 4 are false then ?
if 1 or 2 is false and 3 or 4 is false then something else

would I use and or /and condition. The way I wrote my syntax the or works
but the and does not. Any clues on how to write the syntax to check for all
4 conditions?
  #2   Report Post  
olasa
 
Posts: n/a
Default


This is one solution:
="1 is "&PROPER(TEXT(B244,""))&". 2 is "&PROPER(TEXT(B39,""))&". 3 or
4 is "&PROPER(TEXT(AND(B44.9,B52.4),""))

The formula tests all 4 conditions, since I thought the AND/OR
conditions were not clear. I.e. If 1 or 2 is False and 3 or 4 is False
...
In case you want AND/OR conditions, I would recommend to use CHOOSE.
=CHOOSE(1+(A244)*1+(A39)*2+(AND(A44.9,A52.4))* 3,"1 is False. 2. is
False. 3 or 4 is False","1 is True. 2. is False. 3 or 4......) 7
different solutions


Hope it helped
Ola Sandström


--
olasa
------------------------------------------------------------------------
olasa's Profile: http://www.excelforum.com/member.php...o&userid=17760
View this thread: http://www.excelforum.com/showthread...hreadid=379045

  #3   Report Post  
Duke Carey
 
Posts: n/a
Default

Maybe

=IF(OR(age44,seniority0),IF(OR(aresenic4.9,cadm ium2.4),"Exposure too
high","Exposure ok"),"Too young/low seniority")


"lschuh" wrote:

I would like to know how to write the syntax to test for
1. age44 or 2. Seniority is 9 and by determining the answer to that
3. Arsenic exposure 4.9
4. Cadmium exposure 2.4

If 1. is true or 2. true then I need to check 3. and 4.
if 1. is true or 2. is true and 3 and 4 are false then ?
if 1 or 2 is false and 3 or 4 is false then something else

would I use and or /and condition. The way I wrote my syntax the or works
but the and does not. Any clues on how to write the syntax to check for all
4 conditions?

  #4   Report Post  
lschuh
 
Posts: n/a
Default

Part of that worked. I will paste my formula
=IF(OR($F344,$G39),IF(OR($I32.5,$K32.5,$M32.5 ,$O32.5,$Q32.5,$J35,$L35,$N35,$P35,$S35),1, 0))

This works if the condition is true. If it is not I get "false". Not the 0
or 1 I am looking for.

Not to make it too complicated I will break it down.
If the first OR comes back with true and the second OR comes back with true
then the employee gets a semi physical
If the first OR comes back false and the second OR comes back true then the
employee gets an annual physical
If the first and second OR come back false then the employee doesn't get a
physical.
If the first OR comes back true but the second OR is false then the employee
doesn't get a physical

Both of the first and second or conditions must be met to get the semi.
The first condition can be met but the second condition is not, then none.
The first condition is not met and the second is not met then none
The second condition is met and the first is not then annual.

Does that make it any clearer?



"Duke Carey" wrote:

Maybe

=IF(OR(age44,seniority0),IF(OR(aresenic4.9,cadm ium2.4),"Exposure too
high","Exposure ok"),"Too young/low seniority")


"lschuh" wrote:

I would like to know how to write the syntax to test for
1. age44 or 2. Seniority is 9 and by determining the answer to that
3. Arsenic exposure 4.9
4. Cadmium exposure 2.4

If 1. is true or 2. true then I need to check 3. and 4.
if 1. is true or 2. is true and 3 and 4 are false then ?
if 1 or 2 is false and 3 or 4 is false then something else

would I use and or /and condition. The way I wrote my syntax the or works
but the and does not. Any clues on how to write the syntax to check for all
4 conditions?

  #5   Report Post  
lschuh
 
Posts: n/a
Default

The formula I finally got to work is as follows:
=IF(OR($F344,$G39),1,0)*IF(OR($I32.5,$K32.5,$M 32.5,$O32.5,$Q32.5,$J35,$L35,$N35,$P35,$S3 5),1,0)
thanks to all who responded.

"lschuh" wrote:

I would like to know how to write the syntax to test for
1. age44 or 2. Seniority is 9 and by determining the answer to that
3. Arsenic exposure 4.9
4. Cadmium exposure 2.4

If 1. is true or 2. true then I need to check 3. and 4.
if 1. is true or 2. is true and 3 and 4 are false then ?
if 1 or 2 is false and 3 or 4 is false then something else

would I use and or /and condition. The way I wrote my syntax the or works
but the and does not. Any clues on how to write the syntax to check for all
4 conditions?

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
Formula for multiple conditions Roy Excel Discussion (Misc queries) 3 June 9th 05 08:19 PM
Vlookup with multiple conditions cambrus Excel Worksheet Functions 1 March 11th 05 05:21 PM
SUM based on multiple conditions - SORRY, URGENT!!! marika1981 Excel Worksheet Functions 4 February 18th 05 11:13 AM
How to multiple conditions to validate more than 2 conditions to . Bhuvana Govind Excel Worksheet Functions 1 January 28th 05 07:07 PM
Sum If Multiple Conditions JulieD Excel Worksheet Functions 0 January 25th 05 02:02 PM


All times are GMT +1. The time now is 09:36 PM.

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"