Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
hsg hsg is offline
external usenet poster
 
Posts: 40
Default count no. of times a character occurs in a cell

Is there any function which can tell how many characters (commas) are there
in a cell?

example: if I enter [12,13,15,16] in a cell, I would like to know how many
entries
have been made in that cell, each separated by a comma.
I figure from the data that no. of entries shall be no. of commas plus ONE,
i.e. in above case three commas mean 4 separate numbers.

Can this be done with a simple function? because if A1 has above entry, B1
should
tell how many numbers have been entered in A1.
Similer entries will exist in column A (i.e. A2, A3 etc...) and then
whenever such an
entry is made, B2, B3 etc... should automatically tell how many entries are
there
in these cells.

Pl help
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,058
Default count no. of times a character occurs in a cell

=LEN(A1)-LEN(SUBSTITUTE(A1,",",""))+1

--
Gary''s Student - gsnu200840


"hsg" wrote:

Is there any function which can tell how many characters (commas) are there
in a cell?

example: if I enter [12,13,15,16] in a cell, I would like to know how many
entries
have been made in that cell, each separated by a comma.
I figure from the data that no. of entries shall be no. of commas plus ONE,
i.e. in above case three commas mean 4 separate numbers.

Can this be done with a simple function? because if A1 has above entry, B1
should
tell how many numbers have been entered in A1.
Similer entries will exist in column A (i.e. A2, A3 etc...) and then
whenever such an
entry is made, B2, B3 etc... should automatically tell how many entries are
there
in these cells.

Pl help

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
hsg hsg is offline
external usenet poster
 
Posts: 40
Default count commas in a cell

works exactly,
thank you Gary's student
and Ashish

hsg
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 number of times a text occurs Lee New Users to Excel 3 October 11th 08 10:03 PM
Need to Count the number of times a value occurs within a dt range Gina[_2_] Excel Worksheet Functions 9 July 4th 08 10:19 PM
I would like to count the # of times a value occurs in Col B base shopaholic Excel Worksheet Functions 3 December 9th 05 04:25 PM
How to count the number of times something occurs within a certain month Joyce Excel Worksheet Functions 2 October 18th 05 08:38 PM
How to count the number of times something occurs within a certain month Joyce Excel Worksheet Functions 1 October 18th 05 06:11 PM


All times are GMT +1. The time now is 12:14 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"