Correct Syntax

  • Thread starter Thread starter TeeSee
  • Start date Start date
T

TeeSee

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

What is the correct way to write the OR part of the formula? Thanks
 
=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

| =IF(A1 = 1 #OR#2,1,2)
|
| What is the correct way to write the OR part of the formula? Thanks
 
=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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top