Using IF statements to determine if any data in a large pool is present in a small pool

Copper Contributor

Alright, so basically I have a big list of names each with their own unique number in the cell to the right. There are instances where the same name appears several times each with its own unique number. I have made a list of names that are no longer in my system. What I need is to find a function which will run each name in the large list against the small list and then return the unique number in the cell to the right of the name in the large list in a separate column. I have been unsuccessful with VLOOKUP and IF


excel IF 1.PNG

Small list on the left, Large list on the right

As you can see in this example my function =IF(G1=F2:F433,H2,"NO") works only when the name is directly next to its instance in the small list. Even though there are multiple instances of "AGULAR" in the large list it fails to return the unique number. "AHUJA" is also in the small list, but the unique number associated with the name in the long list is not returned.


VLOOKUP seems like it would be a better option, however since one list is small than the other theres no way it can return the unique number when the reference area is a fraction of the size of the value area. 


I can provide more details if needed, this has been dominating my day and I'm losing the ability to explain the issues I'm having. If anyone else has found a solution to a problem like this I would appreciate it so much if you would share it with me




3 Replies
best response confirmed by tfdavid (Copper Contributor)


Based on the screenshot, please try this...


In I2


and copy it down.


If that doesn't work as desired, please upload a sample file along with your desired output mocked up manually in a column for few rows to illustrate what you are trying to achieve.

You're welcome@tfdavid! Glad it worked as desired.


Since the solution offered worked for you as desired, please take a minute to accept the solution as an Accepted Answer and hit the Like button. :)