Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Combining "AND" with "OR" Statements
How do i join two AND statements with and OR
Cell a1 can be yes or no cell b1 can be 1 or 0 If bi = 1 and a1 = "yes" then c1 should should contain "A" If bi = 1 and a1 = "no" then c1 should contain "R" IF B1 = 0 THEN C1 SHOULD BE BLANK pLEASE HELP |
#2
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Combining "AND" with "OR" Statements
AND and OR statements are usually used as part of a condition or to return a true of false. You are better using if statements they take the basic for If(true,this,otherwise that) To cope with more than 2 outcomes they can be nested =IF(B1=1,IF(A1="yes","A","R"),"") If B1=1 and A1=yes then A If B1=1 and A1 is not yes (the only other option is no) return R If B1 does not equal 1 return blank -- Dav ------------------------------------------------------------------------ Dav's Profile: http://www.excelforum.com/member.php...o&userid=27107 View this thread: http://www.excelforum.com/showthread...hreadid=507126 |
#3
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Combining "AND" with "OR" Statements
THANKS A MILLION DAV, IT WORKS SPLENDIDLY
"Dav" wrote: AND and OR statements are usually used as part of a condition or to return a true of false. You are better using if statements they take the basic for If(true,this,otherwise that) To cope with more than 2 outcomes they can be nested =IF(B1=1,IF(A1="yes","A","R"),"") If B1=1 and A1=yes then A If B1=1 and A1 is not yes (the only other option is no) return R If B1 does not equal 1 return blank -- Dav ------------------------------------------------------------------------ Dav's Profile: http://www.excelforum.com/member.php...o&userid=27107 View this thread: http://www.excelforum.com/showthread...hreadid=507126 |
#4
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Combining "AND" with "OR" Statements
A B C D
1 yes 1 A =IF(B1=0;"";IF(A1="yes";"A";IF(A1="no";"R";"??"))) 2 no 1 R =IF(B2=0;"";IF(A2="yes";"A";IF(A2="no";"R";"??"))) 3 0 =IF(B3=0;"";IF(A3="yes";"A";IF(A3="no";"R";"??"))) 4 Bla 1 ?? =IF(B4=0;"";IF(A4="yes";"A";IF(A4="no";"R";"??"))) if B can contain values other than 0 or 1 than use this form: 5 2 ## =IF(B5=0;"";IF(B5<1;"##";IF(A5="yes";"A";IF(A5="n o";"R";"??")))) Is that what you meant? Hans |
#5
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Combining "AND" with "OR" Statements
Thank you very much Hans
" wrote: A B C D 1 yes 1 A =IF(B1=0;"";IF(A1="yes";"A";IF(A1="no";"R";"??"))) 2 no 1 R =IF(B2=0;"";IF(A2="yes";"A";IF(A2="no";"R";"??"))) 3 0 =IF(B3=0;"";IF(A3="yes";"A";IF(A3="no";"R";"??"))) 4 Bla 1 ?? =IF(B4=0;"";IF(A4="yes";"A";IF(A4="no";"R";"??"))) if B can contain values other than 0 or 1 than use this form: 5 2 ## =IF(B5=0;"";IF(B5<1;"##";IF(A5="yes";"A";IF(A5="n o";"R";"??")))) Is that what you meant? Hans |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
UDFunctions and nested If-the-else statements | Excel Worksheet Functions | |||
combining conditional statements | Excel Worksheet Functions | |||
Linking two IF statements together | Excel Discussion (Misc queries) | |||
Nested IF statements | Excel Worksheet Functions | |||
Combining IF and multiple SUMIF statements, if A>0 & B is between | Excel Worksheet Functions |