ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Correct Syntax (https://www.excelbanter.com/excel-discussion-misc-queries/178109-correct-syntax.html)

TeeSee

Correct Syntax
 
=IF(A1 = 1 #OR#2,1,2)

What is the correct way to write the OR part of the formula? Thanks

JE McGimpsey

Correct Syntax
 
One way:

=IF(OR(A1=1,A1=2),1,2)

Another:

= 2 - OR(A1=1,A1=2)

In article
<51 ,
TeeSee wrote:

=IF(A1 = 1 #OR#2,1,2)

What is the correct way to write the OR part of the formula? Thanks


Kevin B

Correct Syntax
 
=IF(OR(A1=1,A1=2),1,2)

--
Kevin Backmann


"TeeSee" wrote:

=IF(A1 = 1 #OR#2,1,2)

What is the correct way to write the OR part of the formula? Thanks


Conan Kelly

Correct Syntax
 
TeeSee,

=IF(OR(A1=1,A1=2),1,2)

HTH,

Conan




"TeeSee" wrote in message
...
=IF(A1 = 1 #OR#2,1,2)

What is the correct way to write the OR part of the formula? Thanks




Niek Otten

Correct Syntax
 
=IF(OR(A1=1,A1=2),100,200)

Means:
If A1 =1 or A1 =2 Then the result is 100, Else the result is 200

--
Kind regards,

Niek Otten
Microsoft MVP - Excel

"TeeSee" wrote in message ...
| =IF(A1 = 1 #OR#2,1,2)
|
| What is the correct way to write the OR part of the formula? Thanks



Gord Dibben

Correct Syntax
 
=IF(OR(A1=1,A1=2),1,2)

Note: this will return 1 if A1 is either 1 ot 2 and 2 if A1 is anything other
than 1 or 2.

Is that what you want?

Maybe =IF(A1=1,1,IF(A1=2,2,""))


Gord Dibben MS Excel MVP

On Wed, 27 Feb 2008 13:48:33 -0800 (PST), TeeSee wrote:

=IF(A1 = 1 #OR#2,1,2)

What is the correct way to write the OR part of the formula? Thanks



RagDyeR

Correct Syntax
 
Another way:

=If(Or(A1={1,2}),1,2)

--
Regards,

RD

---------------------------------------------------------------------------
Please keep all correspondence within the NewsGroup, so all may benefit !
---------------------------------------------------------------------------
"TeeSee" wrote in message
...
=IF(A1 = 1 #OR#2,1,2)

What is the correct way to write the OR part of the formula? Thanks




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

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