If you do not care about the result of the lookup, but just want to know whether the value in cell A2
appears in A8:A353
, use one of these patterns:
=if( iserror( match(A2, 'sheet2'!A8:A353, 0) ), "No", "Yes" )
=if( iserror( vlookup(A2, 'sheet2'!A8:A353, 1, false) ), "No", "Yes" )
If you do want the result from the lookup, but also want to show "(no match)" when there is no match, you can "catch" the error with ifna()
or iferror()
, like this:
=iferror( filter('sheet2'!A8:A353, 'sheet2'!A8:A353 = A2) ), "(no match)" )
=ifna( vlookup(A2, 'sheet2'!A8:A353, 1, false), "(no match)" )