Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
IF _ AND _ OR
I give up. I can't get the correct formula
If A1 =1 And A2 OR A3 =2 then A4 =4 otherwise A4 ="" |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
IF _ AND _ OR
oldjay wrote:
I give up. I can't get the correct formula If A1 =1 And A2 OR A3 =2 then A4 =4 otherwise A4 ="" Do be careful how you explain logical conundrums. Strictly speaking, your question should be parsed as If (A1 =1 And A2) OR A3 =2 then A4 =4 otherwise A4 ="" because AND takes precedence over OR. Somehow I think you really meant If A1 =1 And (A2 =2 OR A3 =2) then A4 =4 otherwise A4 ="" In which case I would write in A4: |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
IF _ AND _ OR
Try this:
=IF(AND(A1=1,OR(A2=2,A3=2)),4,"") -- Biff Microsoft Excel MVP "oldjay" wrote in message ... I give up. I can't get the correct formula If A1 =1 And A2 OR A3 =2 then A4 =4 otherwise A4 ="" |
#4
Posted to microsoft.public.excel.misc
|
|||
|
|||
IF _ AND _ OR
smartin wrote:
oldjay wrote: I give up. I can't get the correct formula If A1 =1 And A2 OR A3 =2 then A4 =4 otherwise A4 ="" Do be careful how you explain logical conundrums. Strictly speaking, your question should be parsed as If (A1 =1 And A2) OR A3 =2 then A4 =4 otherwise A4 ="" because AND takes precedence over OR. Somehow I think you really meant If A1 =1 And (A2 =2 OR A3 =2) then A4 =4 otherwise A4 ="" In which case I would write in A4: =IF(AND(A1=1,OR(A2=2,A3=2)),4,"") Sorry about the cliff-hanger! |
#5
Posted to microsoft.public.excel.misc
|
|||
|
|||
IF _ AND _ OR
oldjay,
Another solution: "=IF(A1=1*AND(A2=2),4,IF(A1=1*AND(A3=2),4,"")) " hth :-) "oldjay" wrote: I give up. I can't get the correct formula If A1 =1 And A2 OR A3 =2 then A4 =4 otherwise A4 ="" |
#6
Posted to microsoft.public.excel.misc
|
|||
|
|||
IF _ AND _ OR
Perhaps you could explain to us what the AND function does for you in that
formula? In what way does 1*AND(A=2) differ from 1*(A=2) ? -- David Biddulph FloMM2 wrote: oldjay, Another solution: "=IF(A1=1*AND(A2=2),4,IF(A1=1*AND(A3=2),4,"")) " hth :-) "oldjay" wrote: I give up. I can't get the correct formula If A1 =1 And A2 OR A3 =2 then A4 =4 otherwise A4 ="" |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|