Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
Bill
 
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   Report Post  
Posted to microsoft.public.excel.misc
Chip Pearson
 
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   Report Post  
Posted to microsoft.public.excel.misc
Bill
 
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   Report Post  
Posted to microsoft.public.excel.misc
Chip Pearson
 
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   Report Post  
Posted to microsoft.public.excel.misc
Bill
 
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.











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
How to count the number of times a string appears in a column? btsray Excel Worksheet Functions 0 January 25th 06 10:15 PM
Column A = X, Column B =y count = count +1 Scott Excel Worksheet Functions 1 November 15th 05 06:31 AM
Count Intervals of Filtered TEXT values in Column and Return Count across a Row Sam via OfficeKB.com Excel Worksheet Functions 9 July 31st 05 03:37 AM
Inserting Filtered RC cell information into other worksheets Dennis Excel Discussion (Misc queries) 10 July 30th 05 01:54 AM
Count cells based on date range in another column [email protected] New Users to Excel 1 May 5th 05 08:11 PM


All times are GMT +1. The time now is 06:55 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"