P Peter Morris Sep 4, 2006 #1 what's a function I can use in VB to count the number of times a particular string occurs in a named range of cells?
what's a function I can use in VB to count the number of times a particular string occurs in a named range of cells?
B Bob Phillips Sep 5, 2006 #2 Application.Countif(Range("myRange"),"string") as an example -- HTH Bob Phillips (replace somewhere in email address with gmail if mailing direct)
Application.Countif(Range("myRange"),"string") as an example -- HTH Bob Phillips (replace somewhere in email address with gmail if mailing direct)
P Peter Morris Sep 5, 2006 #3 Bob Phillips said: Application.Countif(Range("myRange"),"string") as an example Click to expand... That works. also, is it possible to use wildcards in the search string? Or to count the number of cells in the range with ANY text in?
Bob Phillips said: Application.Countif(Range("myRange"),"string") as an example Click to expand... That works. also, is it possible to use wildcards in the search string? Or to count the number of cells in the range with ANY text in?
T Tom Ogilvy Sep 5, 2006 #4 Application.Countif(Range("myRange"),"*string*) Application.CountA(range("MyRange"))
P Peter Morris Sep 5, 2006 #5 Tom Ogilvy said: Application.Countif(Range("myRange"),"*string*) Application.CountA(range("MyRange")) Click to expand... Brilliant, much gratitude to both of you.
Tom Ogilvy said: Application.Countif(Range("myRange"),"*string*) Application.CountA(range("MyRange")) Click to expand... Brilliant, much gratitude to both of you.