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 fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.
=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
I did try my OR formula it works for the second range but not the first.
 
Last edited:
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,214,617
Messages
6,120,541
Members
448,970
Latest member
kennimack

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