Data Look Up and return

Rich4rd

New Member
Joined
Apr 8, 2014
Messages
11
Hi all,

I was hoping you could help with the following problem. I’ve been trying to use “VLOOKUP” but must be doing something wrong or more likely, using the wrong formula completely!

In column A I have a long list of 6 digit numbers (7000+), in column B I have another, much shorter list of 6 digit numbers. If any of the numbers in column B are in column A I would like a return of ‘YES’ next to the number in column C.

Many thanks for any help!

Richard
 

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.

NeonRedSharpie

Well-known Member
Joined
Jul 14, 2014
Messages
1,678
You don't really need a vlookup for this. You can, but that formula would be like this:

Code:
=IFERROR(IF(VLOOKUP($B1,$A:$A,1,0)=B1,"Yes",""),"")

A little cleaner code would be:

Code:
=IF(COUNTIF($A:$A,$B3)>0, "Yes","")
 
Upvote 0

Special-K99

Well-known Member
Joined
Nov 7, 2006
Messages
8,426
Office Version
  1. 2019
in C1
=IF(NOT(ISERR(VLOOKUP(B1,A$1:A$7000,0))),"Yes","No")
and copy down column C
 
Upvote 0

misrasomendra

Board Regular
Joined
Nov 17, 2012
Messages
74
Hi

Try below formula

=IF(ISNUMBER(MATCH(B1,$A$1:$A$8,0)),"Yes","No")

Adjust the range.
123456678901Yes
234567841893No
345678458986No
678901123456Yes
790012888613No
967756No
114550No
132324No


<tbody>
</tbody>
 
Upvote 0

Forum statistics

Threads
1,195,858
Messages
6,011,979
Members
441,661
Latest member
Pammie007

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
Top