Excel vlookup for alphanumeric lookup value

1.9k views Asked by At

I have two list with hundreds of rows. I would like to know which items of List 2 are in List 1.

List1 items:

ENSG00000004139
ENSG00000004846
ENSG00000005187
ENSG00000005471
ENSG00000005884
ENSG00000006283

List2 items:

ENSG00000003756
ENSG00000003987
ENSG00000003989
ENSG00000004059
ENSG00000004139
ENSG00000004399
ENSG00000004455
ENSG00000004468

In this case, only item ENSG00000004139 in List 2 is included in List 1. I have tried the vlookup formula but it is not working. Anyone knows how to make it work with alphanumeric look up values?

I have tried the VLOOKUP and also the IF function nesting IF(ISERROR(VLOOKUP)). None of them have worked. Not working example: =IF(ISERROR(VLOOKUP(F42,List1!A39:List1!A$2:A$1000,1,TRUE)), "Does NOT exist in List 1","Exists in List 1")

1

There are 1 answers

1
SierraOscar On BEST ANSWER

try a count formula instead

=IF(COUNTIF(List1!A$2:A$1000,F42)>0,"Exists in List 1","Does NOT exist in List 1")

or a match formula

=IF(NOT(ISERROR(MATCH(F42,List1!A$2:A$1000,0))),"Exists in List 1","Does NOT exist in List 1")