Count Occurances of String in a Column?

B

Bill

I need to count the occurrence of a string that would be contained in text in a column.
For example, in column J, starting at cell 1,

J
1 x1 x4
2 x1 x2 x3
3 x2 x5
4 x3 x4 x6

(For example, cell J1 equals the text string "x1 x4".)

So, the answer to the number of times the string ''x4' occurs in J1:J4 is 2.

Is it even possible for this type of counting to be performed with an Excel formula?
How???

Thanks,

-Bill.
 
C

Chip Pearson

Bill,

Use the COUNTIF function. E.g,

=COUNTIF(J1:J4,"*x4*")


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
 
B

Bill

WOW, wildcards! Never knew Excel had 'em! This is gonna change LOTS of things for me...

How can I get it to work if, for example, x4 is in a table cell?
ex: if cell D3 = x4

(I can't get "*D3*" to work)

THANKS!!!!

Bill
 

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