IF OR Help

Alex501

Board Regular
Joined
Dec 11, 2015
Messages
54
Office Version
  1. 365
  2. 2019
Hi

I've done a vlookup in 2 columns to match phone numbers and email addresses, returning "Yes" if there is a match. I'm trying to do an IF OR formula to say that if there is a "Yes" in either column then return "Yes" in the new column. My formula is as follows;

=IF(OR(I2="Yes",J2="Yes","Yes","No")

For some reason it's only picking up instances where both columns are "Yes".

What am I doing wrong?

Thanks
 

Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.
You are missing a right parenthesis:
Excel Formula:
=IF(OR(I2="Yes",J2="Yes"),"Yes","No")
 
Upvote 0
You are missing a right parenthesis:
Excel Formula:
=IF(OR(I2="Yes",J2="Yes"),"Yes","No")
Hi Joe4

Apologies, i mis-typed when I posted the query - I have added the parenthesis in the equation. As far as I can tell the formula is correct.
 
Upvote 0
That formula will return "Yes" if either of I2 or J2 is "Yes".
It would only return "Yes" is BOTH are "Yes" if you use "AND" instead of "OR".

Make sure that all your values in columns I an J are EXACTLY "Yes", and do not have any extra spaces of characters in them.
 
Upvote 0
If that still doesn't work and you have Excel 2019 or 365, you can use the ifs function.

=IFS(I2="Yes","Yes", J2="Yes","Yes",TRUE,"No")
 
Upvote 0

Forum statistics

Threads
1,215,217
Messages
6,123,673
Members
449,116
Latest member
HypnoFant

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