IF and OR

  • Thread starter Thread starter Benoit
  • Start date Start date
B

Benoit

Hello,

B1= 416
B2= 905
B3= 514
B4= 647
B5= 604

In fields A1 to A5, I want to see in the field next to it
(A1 for B1, A2 for B2, etc...) if the number in there is
416 or 647 or 905 and if it is the case, put an X in the
colum otherwise, leave it blank.

How can I do that???
 
A triple nested if is one solution:

=IF(B1=416,"X",IF(B1=647,"X",IF(B1=905,"X","")))

Put that in A1 and copy down.
 
Benoit,

Here's one option:
=IF(B1=416,"x",IF(B1=647,"x",IF(B1=905,"x",)))
There might be a better way using the "or" function though, but this works.

Regards.

Colin
 
Benoit,
This is the other option:
=IF(OR(B1=416, B1=647,B1=905),"x",)

Colin
 
same result, different flavour:

=IF(OR(B1={416,647,905}),"X",""
 

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