Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
MLK MLK is offline
external usenet poster
 
Posts: 81
Default How to count occurence of multiple characters in a cell

Is there a way to count the occurences of multiple characters in a cell?
For example, the cell might contain: smith,john(1234), smith,mary(1234),
doe,john(2345), etc etc.

I would like to be able to count how many times (1234) appears in the cell.
I tried using LEN, but that only counts one character.

Mary-Lou
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 10,593
Default How to count occurence of multiple characters in a cell

=(LEN(A1)-LEN(SUBSTITUTE(A1,"1234","")))/LEN("1234")

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"MLK" wrote in message
...
Is there a way to count the occurences of multiple characters in a cell?
For example, the cell might contain: smith,john(1234), smith,mary(1234),
doe,john(2345), etc etc.

I would like to be able to count how many times (1234) appears in the
cell.
I tried using LEN, but that only counts one character.

Mary-Lou



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,718
Default How to count occurence of multiple characters in a cell

=COUNTIF(A1:A100,"*1234*")


"MLK" wrote:

Is there a way to count the occurences of multiple characters in a cell?
For example, the cell might contain: smith,john(1234), smith,mary(1234),
doe,john(2345), etc etc.

I would like to be able to count how many times (1234) appears in the cell.
I tried using LEN, but that only counts one character.

Mary-Lou

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
MLK MLK is offline
external usenet poster
 
Posts: 81
Default How to count occurence of multiple characters in a cell

Thanks for your response, but I did try something like this, but this is a
cell range where I only need to count the occurences in 1 cell.

Thanks, Mary-Lou

"Teethless mama" wrote:

=COUNTIF(A1:A100,"*1234*")


"MLK" wrote:

Is there a way to count the occurences of multiple characters in a cell?
For example, the cell might contain: smith,john(1234), smith,mary(1234),
doe,john(2345), etc etc.

I would like to be able to count how many times (1234) appears in the cell.
I tried using LEN, but that only counts one character.

Mary-Lou

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
MLK MLK is offline
external usenet poster
 
Posts: 81
Default How to count occurence of multiple characters in a cell

Wonderful! This works exactly as I wanted.

Thank you very much, Mary-Lou.

"Bob Phillips" wrote:

=(LEN(A1)-LEN(SUBSTITUTE(A1,"1234","")))/LEN("1234")

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"MLK" wrote in message
...
Is there a way to count the occurences of multiple characters in a cell?
For example, the cell might contain: smith,john(1234), smith,mary(1234),
doe,john(2345), etc etc.

I would like to be able to count how many times (1234) appears in the
cell.
I tried using LEN, but that only counts one character.

Mary-Lou




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
count occurence and present results Hobbes2006 Excel Worksheet Functions 2 August 7th 06 09:42 PM
Using Sumproduct to count text occurence Dave Excel Worksheet Functions 1 July 25th 06 06:15 PM
Count the occurence of more than one condition wutang1105 Excel Worksheet Functions 1 August 26th 05 07:21 PM
how to count occurence of numbers separated by , in a single cell kish20 Excel Worksheet Functions 3 June 10th 05 07:49 AM
Count the occurence of multiple (4 conditions). - Need urgent help CT Excel Discussion (Misc queries) 5 May 3rd 05 04:47 AM


All times are GMT +1. The time now is 07:38 AM.

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

About Us

"It's about Microsoft Excel"