#1   Report Post  
Posted to microsoft.public.excel.misc
kelljeff
 
Posts: n/a
Default Counting


I am trying to count the number of times a particular phrase appears in
a cell.

example: "#Call" is what I want to count.

however all the cells are formatted like #Callme-name,

Can any one help...


--
kelljeff
------------------------------------------------------------------------
kelljeff's Profile: http://www.excelforum.com/member.php...o&userid=32007
View this thread: http://www.excelforum.com/showthread...hreadid=525671

  #2   Report Post  
Posted to microsoft.public.excel.misc
Domenic
 
Posts: n/a
Default Counting

Try...

=COUNTIF(A2:A100,"#Call*")

or

=COUNTIF(A2:A100,B2&"*")

....where B2 contains your criteria, such as '#Call'.

Hope this helps!

In article ,
kelljeff wrote:

I am trying to count the number of times a particular phrase appears in
a cell.

example: "#Call" is what I want to count.

however all the cells are formatted like #Callme-name,

Can any one help...

  #3   Report Post  
Posted to microsoft.public.excel.misc
kelljeff
 
Posts: n/a
Default Counting


The First worked... Thank you.

Just out of curiosity, I tried that minus the "*" and it did not work.
Does the "*" do something special ?

Again Thank you...


--
kelljeff
------------------------------------------------------------------------
kelljeff's Profile: http://www.excelforum.com/member.php...o&userid=32007
View this thread: http://www.excelforum.com/showthread...hreadid=525671

  #4   Report Post  
Posted to microsoft.public.excel.misc
Domenic
 
Posts: n/a
Default Counting

The "*" is a wildcard character. So basically any cell where the first
5 characters are '#Call' gets counted. If you change the formula to...

=COUNTIF(A2:A100,"*#Call*")

....a cell gets counted when "#Call" occurs anywhere in the string. For
example, cells containing the following strings all get counted...

#Call

#Callxxxxx

xxxx#Call

xxxx#Callxxxx

Hope this helps!

In article ,
kelljeff
wrote:

The First worked... Thank you.

Just out of curiosity, I tried that minus the "*" and it did not work.
Does the "*" do something special ?

Again Thank you...

  #5   Report Post  
Posted to microsoft.public.excel.misc
Rookie_User
 
Posts: n/a
Default Counting

I used part of this and it got me thinking of how could I count how many
times a character is appears within a CELL. I would like to count the
backward slash character "\". If cell A2 contains "w:\jason\hopson\file.xls"
the number would be 3. Any advise?

"Domenic" wrote:

The "*" is a wildcard character. So basically any cell where the first
5 characters are '#Call' gets counted. If you change the formula to...

=COUNTIF(A2:A100,"*#Call*")

....a cell gets counted when "#Call" occurs anywhere in the string. For
example, cells containing the following strings all get counted...

#Call

#Callxxxxx

xxxx#Call

xxxx#Callxxxx

Hope this helps!

In article ,
kelljeff
wrote:

The First worked... Thank you.

Just out of curiosity, I tried that minus the "*" and it did not work.
Does the "*" do something special ?

Again Thank you...




  #6   Report Post  
Posted to microsoft.public.excel.misc
Domenic
 
Posts: n/a
Default Counting

Try...

=LEN(A2)-LEN(SUBSTITUTE(A2,"\",""))

Hope this helps!

In article ,
Rookie_User wrote:

I used part of this and it got me thinking of how could I count how many
times a character is appears within a CELL. I would like to count the
backward slash character "\". If cell A2 contains "w:\jason\hopson\file.xls"
the number would be 3. Any advise?

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
conditional counting with Excel LeicaElmar Excel Worksheet Functions 1 October 17th 05 10:23 PM
conditional counting of autolist cells/rows johli Excel Discussion (Misc queries) 0 September 23rd 05 01:45 PM
Counting rows, then counting values. Michael via OfficeKB.com Excel Discussion (Misc queries) 7 August 4th 05 10:57 PM
Counting names in a column but counting duplicate names once TBoe Excel Discussion (Misc queries) 9 May 11th 05 11:24 PM
Counting... Patrick G Excel Worksheet Functions 3 February 23rd 05 10:05 PM


All times are GMT +1. The time now is 09:42 AM.

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"