Match 2 values in columns and reurtn yes/no

Krivo666

New Member
Joined
Feb 5, 2011
Messages
27
Hi all,

this is doing my head in.
What I'm trying to do is: if name in A2 is in Sheet1!A:A and value in B1 is in Sheet1!I:I (same row) return Yes, otherwise leave blank.

I tried different approaches using MATCH, VLOOKUP, IF but cannot figure it out.
All my attempts do is return yes if A2 is in Sheet1!A:A

I have attached example spreadsheet of the data

This is layout of data

Category

<tbody>
</tbody>
Name

<tbody>
</tbody>
Cat1

<tbody>
</tbody>
Martin Kelly

<tbody>
</tbody>
Cat1

<tbody>
</tbody>
Mark Henry

<tbody>
</tbody>
Cat3

<tbody>
</tbody>
Martin Kelly

<tbody>
</tbody>
Cat2

<tbody>
</tbody>
Mark Henry

<tbody>
</tbody>
Cat2

<tbody>
</tbody>
John Black


<tbody>
</tbody>













and this what I want the result to look like.

NameCat1Cat2Cat3
Martin KellyYesYes
Mark HenryYesYes
John BlackYes

<tbody>
</tbody>








What I tried: =IF(MATCH(A2,Sheet1!$a$2:$a$4,0)*MATCH($b$1,Sheet1!$b$2:$b$4,0),"yes","")


This is small example of what I'm doing, will have to apply this to bigger sets of data and multiple worksheets, but I just can't figure out right approach to MATCH function in this case.

All your help will be appreciated
 

Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.
maybe something like...

b9=IF(COUNTIFS($B$2:$B$6,$A9,$A$2:$A$6,B$8),"Yes","")

Row\Col
A​
B​
C​
D​
1​
CategoryName
2​
Cat1Martin Kelly
3​
Cat1Mark Henry
4​
Cat3Martin Kelly
5​
Cat2Mark Henry
6​
Cat2John Black
7​
8​
NameCat1Cat2Cat3
9​
Martin KellyYesYes
10​
Mark HenryYesYes
11​
John BlackYes

<tbody>
</tbody>
 
Upvote 0
i dont think you need to make it complicated. for example, =a2&b2=a2&i2 if the result is true or false, then just build an If statement to change true to yes and false to blank.
 
Upvote 0
That would only work if I was comparing row by row I think, not when needing to lookup value anywhere in the column
 
Upvote 0

Forum statistics

Threads
1,214,870
Messages
6,122,021
Members
449,060
Latest member
LinusJE

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