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

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.
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,215,483
Messages
6,125,063
Members
449,206
Latest member
Healthydogs

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