Excel formula to count the number of records which contains a certaintext (wildcard)

J

johan

Hello,

If you want to count the number of records which contains a certain
text you can use in excel the formula
=COUNTIF(C:C;"aaa")

Which formula can I use if I want to count the number of records which
contains 'aaa' within the cells.
For example

C1= aaa
C2= bbb
C3= aaaccc
C4 = kkkaaabbb

The number of records which contain the text 'aaa' in this example is
3.
If you see I want to use something like a wildcard in a formula.

regards,
Johan.
 
C

Claus Busch

Hi Johan,

Am Thu, 16 Feb 2012 03:27:27 -0800 (PST) schrieb johan:
C1= aaa
C2= bbb
C3= aaaccc
C4 = kkkaaabbb

try:
=COUNTIF(C:C,"*aaa*")


Regards
Claus Busch
 
D

Don Guillett

Hi Johan,

Am Thu, 16 Feb 2012 03:27:27 -0800 (PST) schrieb johan:


try:
=COUNTIF(C:C,"*aaa*")

Regards
Claus Busch

This would NOT provide the desired answer. You need a looping macro
using vba FINDNEXT to find each occurence and add 1 to the count if
found.
 

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