ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   if,and or functions (https://www.excelbanter.com/excel-worksheet-functions/142812-if-functions.html)

CP

if,and or functions
 
Could someone please help

I like to write a formula

If Cell A =1, and Cell B= 2,3,4,5,or 6, then give me a result of 1,
otherwise 0

Thanks

Sebation.G[_2_]

if,and or functions
 
TRY:
=(A:A=1)*(B:B={2,3,4,5,6})*1

Hope this can be helpful

--
Regards,

Sebation.G
"cp" ...
Could someone please help

I like to write a formula

If Cell A =1, and Cell B= 2,3,4,5,or 6, then give me a result of 1,
otherwise 0

Thanks




Niek Otten

if,and or functions
 
=IF(AND(A1=1,OR(B1={2,3,4,5,6})),1,0)

--
Kind regards,

Niek Otten
Microsoft MVP - Excel

"cp" wrote in message ...
| Could someone please help
|
| I like to write a formula
|
| If Cell A =1, and Cell B= 2,3,4,5,or 6, then give me a result of 1,
| otherwise 0
|
| Thanks



David Biddulph[_2_]

if,and or functions
 
=IF(AND(A1=1,OR(B1={2,3,4,5,6})),1,0)
--
David Biddulph

"cp" wrote in message
...
Could someone please help

I like to write a formula

If Cell A =1, and Cell B= 2,3,4,5,or 6, then give me a result of 1,
otherwise 0

Thanks




Gerigto

if,and or functions
 
Assuming your A=1 value is in cell A1 and your Cell B value is in B1, this
formula should work:

=IF(B1=1,IF(B2=2,1,IF(B2=3,1,IF(B2=4,1,IF(B2=5,1,I F(B2=6,1,0))))),0)
--
TG


"cp" wrote:

Could someone please help

I like to write a formula

If Cell A =1, and Cell B= 2,3,4,5,or 6, then give me a result of 1,
otherwise 0

Thanks


Sebation.G[_2_]

if,and or functions
 
mk a mistake before ,change it here

=(A1=1)*(OR(B1={2,3,4,5,6}))


"Sebation.G" .gbl...
TRY:
=(A:A=1)*(B:B={2,3,4,5,6})*1

Hope this can be helpful

--
Regards,

Sebation.G
"cp" ...
Could someone please help

I like to write a formula

If Cell A =1, and Cell B= 2,3,4,5,or 6, then give me a result of 1,
otherwise 0

Thanks







All times are GMT +1. The time now is 11:36 AM.

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