ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   count number of specified text within a text/cell (https://www.excelbanter.com/excel-discussion-misc-queries/113605-count-number-specified-text-within-text-cell.html)

Vikas Kumar

count number of specified text within a text/cell
 
Hi
wanted to know the number of specified character/text in a word/sentence/cell.
*example:
i want to know the number of "a" used in the word "Ramchandrapura".
answer(retuns) should be:- 4

* Please help me to get the same through formula/VB code....etc.
Regards
Vikas Kumar.





Kevin B

count number of specified text within a text/cell
 
=LEN(A1) returns the number of characters in cell A1. Change the cell
address accordingly.
--
Kevin Backmann


"Vikas Kumar" wrote:

Hi
wanted to know the number of specified character/text in a word/sentence/cell.
*example:
i want to know the number of "a" used in the word "Ramchandrapura".
answer(retuns) should be:- 4

* Please help me to get the same through formula/VB code....etc.
Regards
Vikas Kumar.





Ron Rosenfeld

count number of specified text within a text/cell
 
On Tue, 10 Oct 2006 05:15:02 -0700, Vikas Kumar
wrote:

Hi
wanted to know the number of specified character/text in a word/sentence/cell.
*example:
i want to know the number of "a" used in the word "Ramchandrapura".
answer(retuns) should be:- 4

* Please help me to get the same through formula/VB code....etc.
Regards
Vikas Kumar.




=len(a1) - len(substitute(a1,"a",""))


--ron

Vikas Kumar

count number of specified text within a text/cell
 
Thank lot ron..
i got, wot i wanted..
Regards
Vikas Kumar.

"Ron Rosenfeld" wrote:

On Tue, 10 Oct 2006 05:15:02 -0700, Vikas Kumar
wrote:

Hi
wanted to know the number of specified character/text in a word/sentence/cell.
*example:
i want to know the number of "a" used in the word "Ramchandrapura".
answer(retuns) should be:- 4

* Please help me to get the same through formula/VB code....etc.
Regards
Vikas Kumar.




=len(a1) - len(substitute(a1,"a",""))


--ron


Ron Rosenfeld

count number of specified text within a text/cell
 
On Tue, 10 Oct 2006 22:55:03 -0700, Vikas Kumar
wrote:

Thank lot ron..
i got, wot i wanted..
Regards
Vikas Kumar.

You're welcome. Thanks for the feedback.
--ron


All times are GMT +1. The time now is 08:19 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com