ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   If And Or (https://www.excelbanter.com/excel-discussion-misc-queries/206073-if.html)

K11ngy

If And Or
 
Trying to nest a statement together but have problems

I need to:

If A1 and A2 = pass then Full award, Else ""

I also need to nest in for example

If A1 = pass or exempt and a2 = Pass, Exempt then full award else ""

Cant seem to fathom it

Thanks for help

Steve

Mike H

If And Or
 
try

=IF(AND(OR(A1=UPPER("PASS"),A1=UPPER("Exempt")),OR (A2=UPPER("PASS"),A2=UPPER("EXEMPT"))),"Full Award","")

Mike

"k11ngy" wrote:

Trying to nest a statement together but have problems

I need to:

If A1 and A2 = pass then Full award, Else ""

I also need to nest in for example

If A1 = pass or exempt and a2 = Pass, Exempt then full award else ""

Cant seem to fathom it

Thanks for help

Steve


nastech

If And Or
 
is this what you want?

=IF(AND(OR(P1={"pass","exempt"}),P2="pass"),"full award","")

"k11ngy" wrote:

Trying to nest a statement together but have problems

I need to:

If A1 and A2 = pass then Full award, Else ""

I also need to nest in for example

If A1 = pass or exempt and a2 = Pass, Exempt then full award else ""

Cant seem to fathom it

Thanks for help

Steve


Dave Peterson

If And Or
 
Another one:

=IF(OR(COUNTIF(A1:A2,"pass")=2,
AND(COUNTIF(A1:A2,"pass")=1,COUNTIF(A1:A2,"Exempt" )=1)),"full","")


k11ngy wrote:

Trying to nest a statement together but have problems

I need to:

If A1 and A2 = pass then Full award, Else ""

I also need to nest in for example

If A1 = pass or exempt and a2 = Pass, Exempt then full award else ""

Cant seem to fathom it

Thanks for help

Steve


--

Dave Peterson

nastech

If And Or
 
found this info, not sure if way of shortening these examples up further.

another way of doing it.. something took while to get, to be able to add
many names to one spot while not using any more space:
create a defined name e.g. this formula: insert, name, defined, using P
as a made up name same as in this formula, enter: ={"pass";"exempt"}

=IF(AND(OR(A1={"pass","exempt"}),OR(A2={"pass","ex empt"})),"full award","")
=IF(SUMPRODUCT(--ISNUMBER(FIND(P,A1:A2)))0,"full award","")
=IF(AND(SUMPRODUCT(--ISNUMBER(FIND(P,A1)))0,SUMPRODUCT(--ISNUMBER(FIND(P,A2)))0),"full award","")

this will allow you to change values externally, or add many values to same
formula, without changing the formula.


"k11ngy" wrote:

Trying to nest a statement together but have problems

I need to:

If A1 and A2 = pass then Full award, Else ""

I also need to nest in for example

If A1 = pass or exempt and a2 = Pass, Exempt then full award else ""

Cant seem to fathom it

Thanks for help

Steve


nastech

If And Or
 
did a mix on above:

=IF(OR(COUNTIF(A1:A2,P)=2,AND(COUNTIF(A1:A2,P)=1,C OUNTIF(A1:A2,E)=1)),F,"")
insert, name, define: P as: ={"pass"} E as: ={"exempt"} F as:
={"full award"}

"k11ngy" wrote:

Trying to nest a statement together but have problems

I need to:

If A1 and A2 = pass then Full award, Else ""

I also need to nest in for example

If A1 = pass or exempt and a2 = Pass, Exempt then full award else ""

Cant seem to fathom it

Thanks for help

Steve


nastech

If And Or
 
maybe shortest one yet: (using defined names)
=IF(AND(OR(A1=P,A1=E),OR(A2=A,A2=E)),F,"") or 1 char less:
=IF((OR(A1=P,A1=E))*(OR(A2=A,A2=E)),F,"")


"k11ngy" wrote:

Trying to nest a statement together but have problems

I need to:

If A1 and A2 = pass then Full award, Else ""

I also need to nest in for example

If A1 = pass or exempt and a2 = Pass, Exempt then full award else ""

Cant seem to fathom it

Thanks for help

Steve


nastech

If And Or
 
slight correction:

=IF(AND(OR(A1=P,A1=E),OR(A2=P,A2=E)),F,"")
=IF((OR(A1=P,A1=E))*(OR(A2=P,A2=E)),F,"")

"k11ngy" wrote:

Trying to nest a statement together but have problems

I need to:

If A1 and A2 = pass then Full award, Else ""

I also need to nest in for example

If A1 = pass or exempt and a2 = Pass, Exempt then full award else ""

Cant seem to fathom it

Thanks for help

Steve



All times are GMT +1. The time now is 09:16 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com