Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
IF Statement
If D3 contains the string "pn" and if E3 contains either "m" or "a", I want
the value in I3 to be 1. If D3 does not contain "pn" and E3 does not contain "M" or "A", I want I3 to be zero. Can someone provide a formula to do this? Thanks very much, Bob |
#2
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
IF Statement
Hi Bob, I'm not an expert, but this works when used in cell I3
=IF(AND(D3="pn",OR(E3="m",E3="n")),1,0) I am assuming that you want both "pn" and either of M or N to be present. Again, I'm just a user, perhaps an MVP will have an easier way. Christine "bob" wrote: If D3 contains the string "pn" and if E3 contains either "m" or "a", I want the value in I3 to be 1. If D3 does not contain "pn" and E3 does not contain "M" or "A", I want I3 to be zero. Can someone provide a formula to do this? Thanks very much, Bob |
#3
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
IF Statement
Try this:
=AND(D3="pn",OR(E3={"m","n"}))+0 "bob" wrote: If D3 contains the string "pn" and if E3 contains either "m" or "a", I want the value in I3 to be 1. If D3 does not contain "pn" and E3 does not contain "M" or "A", I want I3 to be zero. Can someone provide a formula to do this? Thanks very much, Bob |
#4
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
IF Statement
Good one.
There's always someone who thinks outside the box. LOL "Teethless mama" wrote: Try this: =AND(D3="pn",OR(E3={"m","n"}))+0 "bob" wrote: If D3 contains the string "pn" and if E3 contains either "m" or "a", I want the value in I3 to be 1. If D3 does not contain "pn" and E3 does not contain "M" or "A", I want I3 to be zero. Can someone provide a formula to do this? Thanks very much, Bob |
#5
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
IF Statement
If D3 contains the string "pn" and if E3 contains either "m" or "a", I
want the value in I3 to be 1. If D3 does not contain "pn" and E3 does not contain "M" or "A", I want I3 to be zero. Can someone provide a formula to do this? Try this: =AND(D3="pn",OR(E3={"m","n"}))+0 I believe your formula can be tightened up a little bit more.... =(D3="pn")*OR(E3={"m","n"}) Rick |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
appending and IF statement to an existing IF statement | Excel Worksheet Functions | |||
IF Statement | Excel Worksheet Functions | |||
If Statement - Need Help | Excel Discussion (Misc queries) | |||
If statement and Isblank statement | Excel Worksheet Functions | |||
Help please, IF statement/SUMIF statement | Excel Worksheet Functions |