If statement

hymenlabitowitz

New Member
Joined
Aug 9, 2011
Messages
1
Hello all. My questions this, how do I write a statement to return a single outcome in one cell drawing from multiple other cells looking for multiple answers that would rate that one outcome?
Exp.
=if(a1 or a3 or a4="rob" or "paul" or "Mary",1,0)

I know this is atroshious looking but you get the gist.
 

Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.
Hello all. My questions this, how do I write a statement to return a single outcome in one cell drawing from multiple other cells looking for multiple answers that would rate that one outcome?
Exp.
=if(a1 or a3 or a4="rob" or "paul" or "Mary",1,0)

I know this is atroshious looking but you get the gist.

Code:
=IF(OR(A1="Rob",A1="Paul",A1="Mary",A3="Rob",A3="Paul",A3="Mary",A4="Rob",A4="Paul",A4="Mary"),1,0)
 
Upvote 0
Try this:

Code:
=IF(OR(A1={"rob","paul","Mary"},A2={"rob","paul","Mary"},A3={"rob","paul","Mary"}),1,0)

probably a way to make it a bit shorter, but not sure how. This works for me though.
 
Upvote 0
Welcome to the board...

There's probably better ways, but this should do

=--OR(A1={"rob","paul","mary"},A3={"rob","paul","mary"},A4={"rob","paul","mary"})
 
Upvote 0
And there are better ways...

If you actually meant A1 A2 A3 and A4 (you skipped A2 in your post)
Then try
=--(SUM(COUNTIF(A1:A4,{"rob";"paul";"mary"}))>0)
 
Upvote 0

Forum statistics

Threads
1,224,548
Messages
6,179,445
Members
452,915
Latest member
hannnahheileen

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top