View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
T. Valko T. Valko is offline
external usenet poster
 
Posts: 15,768
Default COUNT or COUNTIF using wildcard text?

Try this:

=SUMPRODUCT(--(N17:N120="ep"),--(ISNUMBER(SEARCH("migrate",S17:S120))))

Biff

"WiFiMike2006" wrote in message
...
Hello,

I am trying to create a formula that will count the number of cells with
certain text (EP) in one range that also have an instance of certain
wildcard
text (*migrate*) in another range in the same row.

For example, this is the formula I'm using, but it doesn't seem to work,
and
I need to know what I should use instead:

=COUNT(IF((N17:N120="EP")*(S17:S120="*migrate*"),0 ))

However, the formula works if it looks like this (wildcard text not used
for
"migrate"):

=COUNT(IF((N16:N101="EF")*(S16:S101="migrate"),0))

But, the reason I need to use the wildcard text is that sometimes the text
in S16:S101 will be changed to "migrated" or "replaced & migrated", which
throws off the count resulting from the formula.

Is there a way to do this with a different function or formula?
Apparently,
the wildcard text thing only seems to work for criteria in simpler
formulas
like this one:

=COUNTIF($O$16:$O$105, "*SWM*")

Any help would be greatly appreciated. I've spent hours trying to figure
this one out.

Thank you!

Mike