View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Dave Peterson
 
Posts: n/a
Default Can I use character masks within a function?

Sometimes, yes. Sometimes, no. Depends on the function.

=countif(a1:a10,"*hi*")
will count the number of cells that contain "hi" anywhere.

But there are other functions that may help:

=if(isnumber(search("hi",a1)),"found it","nope")

You may want to be more specific with the followup.


jbouwhuis wrote:

I'm wondering about the possibility of using masks (*, ?, etc) within
functions, such as IF statements. Is it possible? If so, how do I structure
the statement to make it work?


--

Dave Peterson