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

Fastest way to copy a worksheet?
Hold down the Ctrl key while dragging tab for Sheet1 to the right. Excel will make a copy of the worksheet.
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
in C1
=IF(NOT(ISERR(VLOOKUP(B1,A$1:A$7000,0))),"Yes","No")
and copy down column C
 
Upvote 0
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,215,064
Messages
6,122,937
Members
449,094
Latest member
teemeren

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