Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 12
Default Searching for text & counting how many times it appears

I import text from various data sources. Is there a function (or if anyone
has a macro) that will allow me to search the worksheet/workbook for a
specific text and print the number of times that text appears? The text may
not necessarily be in the same location at all times. It could also be
combined with other text in a cell e.g. "AJAA" or "AJAA text".

As always, your help is greatly appreciated.
Thanks
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,574
Default Searching for text & counting how many times it appears

=COUNTA([your range],[text you want to count, enclosed in quotation marks])

Example: =COUNTA(A1:A10000,"this is how you count the frequency of a text
string")

Dave
--
Brevity is the soul of wit.


"smck" wrote:

I import text from various data sources. Is there a function (or if anyone
has a macro) that will allow me to search the worksheet/workbook for a
specific text and print the number of times that text appears? The text may
not necessarily be in the same location at all times. It could also be
combined with other text in a cell e.g. "AJAA" or "AJAA text".

As always, your help is greatly appreciated.
Thanks

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,688
Default Searching for text & counting how many times it appears

Think you meant COUNTIF.

Biff

"Dave F" wrote in message
...
=COUNTA([your range],[text you want to count, enclosed in quotation
marks])

Example: =COUNTA(A1:A10000,"this is how you count the frequency of a text
string")

Dave
--
Brevity is the soul of wit.


"smck" wrote:

I import text from various data sources. Is there a function (or if
anyone
has a macro) that will allow me to search the worksheet/workbook for a
specific text and print the number of times that text appears? The text
may
not necessarily be in the same location at all times. It could also be
combined with other text in a cell e.g. "AJAA" or "AJAA text".

As always, your help is greatly appreciated.
Thanks



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 12
Default Searching for text & counting how many times it appears

Thank you so much Biff. COUNTIF works better than COUNTA. The only addition I
added to that formula was the asterisk wildcard e.g. "AJAA*" because I wanted
Excel to count the occurrence even if there were other words in the cell.
When I did not have the wildcard, only the cells with that specific data was
counted.

"Biff" wrote:

Think you meant COUNTIF.

Biff

"Dave F" wrote in message
...
=COUNTA([your range],[text you want to count, enclosed in quotation
marks])

Example: =COUNTA(A1:A10000,"this is how you count the frequency of a text
string")

Dave
--
Brevity is the soul of wit.


"smck" wrote:

I import text from various data sources. Is there a function (or if
anyone
has a macro) that will allow me to search the worksheet/workbook for a
specific text and print the number of times that text appears? The text
may
not necessarily be in the same location at all times. It could also be
combined with other text in a cell e.g. "AJAA" or "AJAA text".

As always, your help is greatly appreciated.
Thanks




  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 12
Default Searching for text & counting how many times it appears

Thanks for your response Dave however, COUNTIF worked better for my needs.


"Dave F" wrote:

=COUNTA([your range],[text you want to count, enclosed in quotation marks])

Example: =COUNTA(A1:A10000,"this is how you count the frequency of a text
string")

Dave
--
Brevity is the soul of wit.


"smck" wrote:

I import text from various data sources. Is there a function (or if anyone
has a macro) that will allow me to search the worksheet/workbook for a
specific text and print the number of times that text appears? The text may
not necessarily be in the same location at all times. It could also be
combined with other text in a cell e.g. "AJAA" or "AJAA text".

As always, your help is greatly appreciated.
Thanks



  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,574
Default Searching for text & counting how many times it appears

Yeah I meant COUNTIF. Sorry.
--
Brevity is the soul of wit.


"smck" wrote:

Thanks for your response Dave however, COUNTIF worked better for my needs.


"Dave F" wrote:

=COUNTA([your range],[text you want to count, enclosed in quotation marks])

Example: =COUNTA(A1:A10000,"this is how you count the frequency of a text
string")

Dave
--
Brevity is the soul of wit.


"smck" wrote:

I import text from various data sources. Is there a function (or if anyone
has a macro) that will allow me to search the worksheet/workbook for a
specific text and print the number of times that text appears? The text may
not necessarily be in the same location at all times. It could also be
combined with other text in a cell e.g. "AJAA" or "AJAA text".

As always, your help is greatly appreciated.
Thanks

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
Counting the number of times someone called in sick smskater Excel Discussion (Misc queries) 3 September 16th 05 11:10 PM
Counting cells with a specified frequency(how many times it appear Kelvin Excel Discussion (Misc queries) 0 July 13th 05 08:36 AM
How do I count how many times a code appears in a column? Leo Excel Worksheet Functions 3 June 2nd 05 08:50 PM
Counting the number of times a word appears in a worksheet Jig Bhakta Excel Worksheet Functions 4 February 3rd 05 03:01 AM
How do I count how many times x appears in a column? Ian Roberts Excel Worksheet Functions 2 November 7th 04 03:13 PM


All times are GMT +1. The time now is 10:23 AM.

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"