Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming,microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 13
Default strings in a range

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?


  #2   Report Post  
Posted to microsoft.public.excel.programming,microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 10,593
Default strings in a range

Application.Countif(Range("myRange"),"string")

as an example

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Peter Morris" <nospam.ple@se wrote in message
. uk...
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?




  #3   Report Post  
Posted to microsoft.public.excel.programming,microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 13
Default strings in a range


"Bob Phillips" wrote in message
...
Application.Countif(Range("myRange"),"string")

as an example

--
HTH


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?


  #4   Report Post  
Posted to microsoft.public.excel.programming,microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 27,285
Default strings in a range

Application.Countif(Range("myRange"),"*string*)

Application.CountA(range("MyRange"))

--
Regards,
Tom Ogilvy


"Peter Morris" <nospam.ple@se wrote in message
. uk...

"Bob Phillips" wrote in message
...
Application.Countif(Range("myRange"),"string")

as an example

--
HTH


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?



  #5   Report Post  
Posted to microsoft.public.excel.programming,microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 13
Default strings in a range


"Tom Ogilvy" wrote in message
...
Application.Countif(Range("myRange"),"*string*)

Application.CountA(range("MyRange"))

--
Regards,
Tom Ogilvy


Brilliant, much gratitude to both of you.


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Wrap Text Across Columns & Rows Michael Excel Dude Excel Discussion (Misc queries) 1 September 4th 06 02:14 AM
Duplicate Range Names by worksheet FlaAl Excel Discussion (Misc queries) 0 May 24th 06 05:14 PM
Help with using range names in sum function soteman2005 Excel Worksheet Functions 2 November 28th 05 04:43 PM
Array to named range conversion... i-Zapp Excel Discussion (Misc queries) 4 October 25th 05 09:09 PM
How to Select a relative range with Using "Find" and Offset() Dennis Excel Discussion (Misc queries) 7 July 27th 05 03:57 PM


All times are GMT +1. The time now is 01:49 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"