I need "Yes" to be returned if the data in C2 matches A1:A12 on Sheet 2 and if not return "No".
I entered this function:
=IFERROR(IF((VLOOKUP(C2,'Sheet2'!A1:A12,1,TRUE))=C2,"yes","no"),"")
This only works part time, the data on sheet2 in columns A1:A12 all start with the number 7. In testing I have found if I enter a number in my reference cell, C2, that starts with a 7 or higher I either get "Yes"/"No" depending on if it matches one of the cells in sheet2 A1:A12 (working as expected). But, if I enter a number that starts with a number lower than 7 the function errors with no result. Not sure what is causing this.
For example:
If Sheet2 A1:A12 contained
| 7500 |
| 7503 |
| 7504 |
| 7705 |
| 7507 |
| 7509 |
| 7568 |
| 7745 |
| 7747 |
| 7748 |
If I enter 7503 in cell C2, it would return "Yes"
If I enter 7777 in cell C2 it would return "No"
If I enter 9999 in cell C2 it would return "No"
If I enter 5306 in cell C2 nothing is returned
If I enter 1111 in cell C2 nothing is returned