Using IF, AND, MATCH to cross check two related values is not working as intended

nilnilnil0911

New Member
Joined
Jun 21, 2023
Messages
3
Office Version
  1. 365
Platform
  1. Windows
So I'm trying to match two values against two columns in another table. It has to be a combination of both or it should return false.

For example, comparing Table1 and Table 2, they both have the same columns Color and Fruit. I want to find if a Blue, Apple in Table1 also exists in Table2 in the same row.

I came up with IF, AND, MATCH. I even checked it with ChatGPT and it just wouldn't work. Please help out this Excel noob.

=IF(AND(MATCH(B2; 'contacts'!A2:A1505;1)),(MATCH(D2; 'contacts'!B2:B1505;1)); "Yes"; "No")
 

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.
Hi & welcome to MrExcel.
How about
Excel Formula:
=IF(COUNTIFS(Contacts!A2:A1505,B2,Contacts!B2:B1505,D2), "Yes", "No")
 
Upvote 0
Hi & welcome to MrExcel.
How about
Excel Formula:
=IF(COUNTIFS(Contacts!A2:A1505,B2,Contacts!B2:B1505,D2), "Yes", "No")
Still an error. Is it a microsoft 365 problem? i cant seem to make it work.
 
Upvote 0
What error?
It just wont go through, 365 doesnt let me enter it. BTW does your formula check the two values separately, I need them to be together in the same row. I tried this formula and returns an error as well (sigh)
=IFERROR(IF(MATCH(1,(B2=contacts!A2:A1505)*(D2=contacts!B2:B1505),0)=MATCH(1,(B2=contacts!A2:A1505)*(D2=contacts!B2:B1505),0),"Yes","No"),"No")
 
Upvote 0
Judging from your initial post, I am guessing maybe your version of Excel requires semi-colons instead of commas to separate formula arguments.
So you may need to replace all commas in Fluff's formula to semi-colons.
 
Upvote 0

Forum statistics

Threads
1,215,153
Messages
6,123,325
Members
449,097
Latest member
gameover8

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