Lookup list and return YES or NO

tma

Board Regular
Joined
Jan 31, 2008
Messages
66
Hello,

I have a list of surnames in sheet 1, column B

I have another list of surnames in sheet 2. column B

What i want to achieve is for the list in sheet 2, to be compared to the list in sheet 1, and return either a YES or a NO (TRUE or FALSE would work fine), in sheet 2, column C - next to the corresponding name


so i want to ask excel to look up the name in Sheet2!B1, in my column Sheet1!B:B

and if it finds a match, return "YES" in Sheet2!C1, if it does not find a match, return "NO" in Sheet2!C1

i hope that makes sense, i have been playing around with the IF, VLOOKUP, and MATCH functions all morning but i cannot seem to get it right.

Thanks.
 
Last edited:

Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.
C2, Sheet2...

=ISNUMBER(MATCH(B2,Sheet1!$B:$B,0))+1

1 as result means Yes, 0 No.

Hello,

I have a list of surnames in sheet 1, column B

I have another list of surnames in sheet 2. column B

What i want to achieve is for the list in sheet 2, to be compared to the list in sheet 1, and return either a YES or a NO (TRUE or FALSE would work fine), in sheet 2, column C - next to the corresponding name
 
Upvote 0
Derived from C Pearson
Code:
=IF(COUNTIF(master;OFFSET(second;ROW()-ROW(second);0))>0;"Yes";"No")
Where Maéster is the first list and Second the other
 
Upvote 0
=IF(ISNA(MATCH(B1,Sheet1!$B$1:$B$100,0)),"No","Yes") in Sheet2 C1 and fill down. Assumes lists no longer than 100 rows
 
Upvote 0
C2, Sheet2...

=ISNUMBER(MATCH(B2,Sheet1!$B:$B,0))+1

1 as result means Yes, 0 No.

thanks, this works

Derived from C Pearson
Code:
=IF(COUNTIF(master;OFFSET(second;ROW()-ROW(second);0))>0;"Yes";"No")
Where Maéster is the first list and Second the other

This does not seem to want to let me select only one column ($B:$B)

=IF(ISNA(MATCH(B1,Sheet1!$B$1:$B$100,0)),"No","Yes") in Sheet2 C1 and fill down. Assumes lists no longer than 100 rows

ah ha! this does the trick - i assume if i need to extend my list past 100 rows, i can just ammend the range in the formula without any problems?


Thanks for all the extremely fast replies. I will certainly be coming back here again :)
 
Upvote 0

Forum statistics

Threads
1,213,546
Messages
6,114,256
Members
448,558
Latest member
aivin

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