Function to find specific value and return

ERed1

Board Regular
Joined
Jun 26, 2019
Messages
104
Hi all,

So I need help writing a formula, not in vba, that looks at a number in column A, then looks at another sheet. Finds the value from column A in a list. If a value isn't found, it returns "Check". For example:

[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]Sheet 1[/TD]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[/TR]
[TR]
[TD]1
[/TD]
[TD]Dog[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]Cat
[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]Frog[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]Sheet 2
[/TD]
[TD]A[/TD]
[TD]B[/TD]
[TD]C
[/TD]
[/TR]
[TR]
[TD]1
[/TD]
[TD]Dog[/TD]
[TD]Food[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]Cat[/TD]
[TD]Water[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]Dog[/TD]
[TD]Nothing[/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]

So using the tables as an example, I need a formula in sheet 1 Column B that will look at column A, find "Dog" on sheet 2. If Dog has "nothing", in column B, then retutrn the value "check".

If that doesn't make sense I can try and describe it.
 

Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.
What should happen if dog does have something in col b on sheet2?
 
Upvote 0
It should just return a blank. I would also like it to do it for cat and frog too, if that makes sense.
 
Upvote 0
How about
=IF(ISNA(VLOOKUP(A2,Sheet2!$A$2:$B$10,2,0)),"",IF(VLOOKUP(A2,Sheet2!$A$2:$B$10,2,0)=0,"Check",""))
 
Upvote 0
Glad to help & thanks for the feedback
 
Upvote 0
What is the first part of the code doing?
"=IF(ISNA(VLOOKUP(A2,Sheet2!$A$2:$B$10,2,0)),"",...)
 
Upvote 0
If the value in A2 does not exist on sheet2 you will get a #N/A error, that is just checking for that
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,176
Members
453,021
Latest member
Justyna P

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