A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Count Occurances of String in a Column?



 
 
Thread Tools Display Modes
  #1  
Old February 23rd, 2006, 12:02 AM posted to microsoft.public.excel.misc
external usenet poster
 
Posts: n/a
Default Count Occurances of String in a Column?

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.



  #2  
Old February 23rd, 2006, 12:10 AM posted to microsoft.public.excel.misc
external usenet poster
 
Posts: n/a
Default Count Occurances of String in a Column?

Bill,

Use the COUNTIF function. E.g,

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


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



"Bill" wrote in message
...
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.





  #3  
Old February 23rd, 2006, 12:22 AM posted to microsoft.public.excel.misc
external usenet poster
 
Posts: n/a
Default Count Occurances of String in a Column?

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


"Chip Pearson" wrote in message...
Bill,

Use the COUNTIF function. E.g,

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


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



"Bill" wrote in message
...
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.







  #4  
Old February 23rd, 2006, 12:26 AM posted to microsoft.public.excel.misc
external usenet poster
 
Posts: n/a
Default Count Occurances of String in a Column?

Bill,

Try

=COUNTIF(J1:J4,"*"&D3&"*")


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



"Bill" wrote in message
...
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


"Chip Pearson" wrote in message...
Bill,

Use the COUNTIF function. E.g,

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


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



"Bill" wrote in message
...
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.









  #5  
Old February 23rd, 2006, 12:30 AM posted to microsoft.public.excel.misc
external usenet poster
 
Posts: n/a
Default Count Occurances of String in a Column?

Yep, just figured that out.

Thanks, Chip, you saved my butt,

Bill.


"Chip Pearson" wrote in message
.. .
Bill,

Try

=COUNTIF(J1:J4,"*"&D3&"*")


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



"Bill" wrote in message
...
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


"Chip Pearson" wrote in message...
Bill,

Use the COUNTIF function. E.g,

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


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



"Bill" wrote in message
...
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.











 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Need to Improve Code Copying/Pasting Between Workbooks David General Discussion 1 January 6th, 2006 03:56 AM
Positioning Numeric Values Resulting from 6 Column Array Formula Sam via OfficeKB.com Worksheet Functions 2 January 5th, 2006 02:03 AM
match and count words David Worksheet Functions 5 July 4th, 2005 02:24 AM
Return Count for LAST NonBlank Cell in each Row Sam via OfficeKB.com Worksheet Functions 12 April 17th, 2005 10:36 PM
unable to repair inobox Sudheer Mumbai General Discussion 1 February 20th, 2005 11:55 AM


All times are GMT +1. The time now is 07:27 PM.


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