ExcelBanter

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

Titian

Nested If / And / Or ?
 
Greetings

Is there any way the following can be expressed in single formula?

If A2 = 1 and B2 <= 10 - "Yes"

If A2 = 1 and B2 10 - "No"

If A2 = 2 and B2 <= 20 - "Yes"

If A2 = 2 and B2 20 - "No"

Thanks in advance.



Dan





Bryan Hessey

Nested If / And / Or ?
 

=If(or(and(A2=1,B2<=10),and(A2=2,B2<=20)),"Yes",if (or(and(A2=1,B210),and(A2=2,B220)),"No","")

There are options that will leave the cell blank (= "" )


Titian Wrote:
Greetings

Is there any way the following can be expressed in single formula?

If A2 = 1 and B2 <= 10 - "Yes"

If A2 = 1 and B2 10 - "No"

If A2 = 2 and B2 <= 20 - "Yes"

If A2 = 2 and B2 20 - "No"

Thanks in advance.



Dan



--
Bryan Hessey
------------------------------------------------------------------------
Bryan Hessey's Profile: http://www.excelforum.com/member.php...o&userid=21059
View this thread: http://www.excelforum.com/showthread...hreadid=487142


Bryan Hessey

Nested If / And / Or ?
 

=IF(OR(AND(A2=1,B2<=10),AND(A2=2,B2<=20)),"Yes",IF (OR(AND(A2=1,B210),AND(A2=2,B220)),"No",""))

There are options that will leave the cell blank (= "" )


Titian Wrote:
Greetings

Is there any way the following can be expressed in single formula?

If A2 = 1 and B2 <= 10 - "Yes"

If A2 = 1 and B2 10 - "No"

If A2 = 2 and B2 <= 20 - "Yes"

If A2 = 2 and B2 20 - "No"

Thanks in advance.



Dan



--
Bryan Hessey
------------------------------------------------------------------------
Bryan Hessey's Profile: http://www.excelforum.com/member.php...o&userid=21059
View this thread: http://www.excelforum.com/showthread...hreadid=487142


Titian

Nested If / And / Or ?
 
"Bryan Hessey" wrote in message

=IF(OR(AND(A2=1,B2<=10),AND(A2=2,B2<=20)),"Yes",IF (OR(AND(A2=1,B210),AND(A2=2,B220)),"No",""))

There are options that will leave the cell blank (= "" )


Titian Wrote:
Greetings

Is there any way the following can be expressed in single formula?

If A2 = 1 and B2 <= 10 - "Yes"

If A2 = 1 and B2 10 - "No"

If A2 = 2 and B2 <= 20 - "Yes"

If A2 = 2 and B2 20 - "No"

Thanks in advance.



Dan



--
Bryan Hessey
------------------------------------------------------------------------
Bryan Hessey's Profile:
http://www.excelforum.com/member.php...o&userid=21059
View this thread: http://www.excelforum.com/showthread...hreadid=487142


Thanks so much Bryan

it works a treat.

cheers
Dan



Bryan Hessey

Nested If / And / Or ?
 

Good to see, and thanks for the response.

Titian Wrote:[color=blue]
"Bryan Hessey" wrote in message


=IF(OR(AND(A2=1,B2<=10),AND(A2=2,B2<=20)),"Yes",IF (OR(AND(A2=1,B210),AND(A2=2,B220)),"No",""))


it works a treat.

cheers
Dan



--
Bryan Hessey
------------------------------------------------------------------------
Bryan Hessey's Profile: http://www.excelforum.com/member.php...o&userid=21059
View this thread: http://www.excelforum.com/showthread...hreadid=487142



All times are GMT +1. The time now is 10:07 PM.

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