View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
vezerid vezerid is offline
external usenet poster
 
Posts: 751
Default Cell Contains Word

Thanks Harlan. I am always impressed by your posts.

Kostis

On Nov 19, 9:12*pm, Harlan Grove wrote:
wrote...

...ISNUMBER(SEARCH("total",G7))

...

COUNTIF(G7,"*Total*")

would be more efficient (shorter, faster, uses less memory in RAM and
on disk) for case insensitive searches. It returns 1 if Total occurs
in the value of G7, 0 otherwise, and Excel treats 1 as TRUE and 0 as
FALSE in the 1st argument to IF.

For case sensitive searches,

COUNT(FIND("Total",G7))

is shorter than the ISNUMBER alternative. ISNUMBER is better when you
need to return an array.