Searching for text & counting how many times it appears

G

Guest

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
 
G

Guest

=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
 
B

Biff

Think you meant COUNTIF.

Biff

Dave F said:
=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 said:
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
 
G

Guest

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 said:
Think you meant COUNTIF.

Biff

Dave F said:
=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 said:
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
 
G

Guest

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


Dave F said:
=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 said:
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
 
G

Guest

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


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


Dave F said:
=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 said:
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top