View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Harlan Grove Harlan Grove is offline
external usenet poster
 
Posts: 733
Default Can we use multiple if with VLookup function

Pete_UK wrote...
If you want to check if the word "the" appears in cell A1, you could
use this:

=IF(ISNUMBER(FIND("the",A1)),"yes","no")

....

Picky: this only tests for the SUBSTRING "the" in A1. In addition to
the word 'the' it'd also match their, then, another etc. To check for
the word 'the' in a cell requires something a bit more elaborate.

=IF(COUNT(SEARCH(MID(" "&A1&" ",FIND("the",A1)+{0,4},1),
"ABCDEFGHIJKLMNOPQRSTUVWXYZ_0123456789"))=0,"yes", "no")

This defines 'word' as any token containing letters, numbers or
underscores. Any other characters delimit 'words'.