View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
T. Valko T. Valko is offline
external usenet poster
 
Posts: 15,768
Default Vlookup returning a YES or NO

Note that COUNTIF requires the source file be open. An alternative that
works whether the source file is open or closed:

=IF(COUNT(MATCH(A6,'[Catalogue Robs Test Stock
Range.xls]Catalogue'!$A$1:$A$5000,0)),"YES,"NO")


--
Biff
Microsoft Excel MVP


"Rob" wrote in message
...
I must have the found the most complicated way to half do it.
Thanks Miguel that works a treat.

"Héctor Miguel" wrote:

hi, Rob !

I'd like to return a yes or no response.
at the moment only the YES is working.
Can anyone give me a tip?
Thanks
Rob

=IF(A6=VLOOKUP(A6,'[Catalogue Robs Test Stock
Range.xls]Catalogue'!$1:$5000,1,FALSE),"YES","NO")


AFAIK, vlookup will try to find your lookup_value in the first column of
your lookup_table
so, it doesn't make sense to incude whole columns by reference of the
entire rows -?-

try with:

=if(countif('[Catalogue Robs Test Stock
Range.xls]Catalogue'!$A$1:$A$5000,A6),"YES,"NO")

hth,
hector.