Reference 2 ranges in an If statement

JustHooch

New Member
Joined
May 17, 2018
Messages
44
I know how to reference 1 range of cells in an if statement. I had the below and it worked well.

=IF(ISNA(MATCH("Yes",'Ticket Offer Info'!B21:B24,0)),"No","Yes")

But I have having trouble figuring out how to add another range as an "OR" to the formula. I need to also reference any yes in range " 'Ticket Offer Info'!B26:B31 ". Basically if there is a "Yes" in either of the 2 ranges then return a "Yes" if not then "No"

I had the below but I know it is not quite right.
=IF(OR(ISNA(MATCH("Yes",'Ticket Offer Info'!B21:B24,0)),ISNA(MATCH("Yes",'Ticket Offer Info'!B26:B31,0))),"No","Yes")

Any ideas
 

Excel Facts

How to create a cell-sized chart?
Tiny charts, called Sparklines, were added to Excel 2010. Look for Sparklines on the Insert tab.
=IF(OR(ISNA(MATCH("Yes",'Ticket Offer Info'!B21:B24,0)),ISNA(MATCH("Yes",'Ticket Offer Info'!B26:B31,0))),"No","Yes")

I think that might do it. I didn't set up a workbook to test it, but it looks right. See what happens.

EDIT: That's exactly what you said wasn't quite right....did you try it, or do you just "think" it's not quite right, just like I "think" it is right? :)
 
Last edited:
Upvote 0
Try

=IF(OR(ISNUMBER(MATCH("Yes",'Ticket Offer Info'!B21:B24,0)),ISNUMBER(MATCH("Yes",'Ticket Offer Info'!B26:B31,0))),"Yes","No")

M.
 
Upvote 0
The below worked. Thank you. Never thought to try ISNUMBER

=IF(OR(ISNUMBER(MATCH("Yes",'Ticket Offer Info'!B21:B24,0)),ISNUMBER(MATCH("Yes",'Ticket Offer Info'!B26:B31,0))),"Yes","No")
 
Upvote 0
The below worked. Thank you. Never thought to try ISNUMBER

=IF(OR(ISNUMBER(MATCH("Yes",'Ticket Offer Info'!B21:B24,0)),ISNUMBER(MATCH("Yes",'Ticket Offer Info'!B26:B31,0))),"Yes","No")

You are welcome. Thanks for the feedback.

M.
 
Upvote 0

Forum statistics

Threads
1,223,992
Messages
6,175,822
Members
452,672
Latest member
missbanana

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