=IF(ISNA(VLOOKUP

faeryluv

New Member
Joined
Sep 1, 2018
Messages
47
I'd like to compare the names on Sheet 2 to the names on Sheet 1.
I would like it to return a Yes or No depending on if any of the names from Sheet 2 are on Sheet 1.
I'm using any rows with a "No" to Query onto another Sheet so that's why I need it this way.

Formula I'm using that is returning an ERROR:
=IF(ISNA(VLOOKUP(A3 or B3,Sheet1!A:A,1,FALSE)), "No", "Yes")


Picture3.png


Thanks in advance! :)
 

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.
Here is one way:
=IF(ISNA(IFERROR(VLOOKUP(A3,Sheet1!A:A,1,FALSE),VLOOKUP(B3,Sheet1!A:A,1,FALSE))),"No","Yes")
 
Upvote 0
Try this

=IF(IFERROR(MATCH(A2,Sheet1!A:A,0),IFERROR(MATCH(B2,Sheet1!A:A,0),0)),"Yes","No")
 
Upvote 0
I'd like to compare the names on Sheet 2 to the names on Sheet 1.
I would like it to return a Yes or No depending on if any of the names from Sheet 2 are on Sheet 1.
I'm using any rows with a "No" to Query onto another Sheet so that's why I need it this way.

Formula I'm using that is returning an ERROR:
=IF(ISNA(VLOOKUP(A3 or B3,Sheet1!A:A,1,FALSE)), "No", "Yes")

View attachment 3323

Thanks in advance! :)

Hi @faeryluv,

The answer is already on the "OR" you put inside your Formulas. I Imagine that it is a YES with one or two names from Sheet2 contained in Sheet1 and NO only if none of the names on the rows are present, correct? Check the OR Formula and instead of looking for Errors with ISNA check for valid matches with ISTEXT.

Here's my suggestion:

=OR(ISTEXT(VLOOKUP(Sheet2!$A3, Sheet1!A:A, 1, FALSE)), ISTEXT(VLOOKUP(Sheet2!$B3, Sheet1!A:A, 1, FALSE)))

This way you can check if condition 1 (A3 Entry) or condition 2 (B3 Entry) are inside Column A from Sheet1
Tried here and worked. Let me know if it's working for you too.

Edit: It is not "row Locked" so you can pull the formula to all the needed rows with names
 
Upvote 0
=IF(OR(SUMPRODUCT(--(Sheet1!A1:A500=Sheet2!A3)),SUMPRODUCT(--(Sheet1!A1:A500=Sheet2!B3)))=TRUE,"Yes","No")
 
Upvote 0
Wow, everyone! Thank you all for your quick replies, I really appreciate it. I tried the first reply, and it worked great! I did copy down the other replies too, just in case ?
 
Upvote 0

Forum statistics

Threads
1,214,632
Messages
6,120,652
Members
448,975
Latest member
sweeberry

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