ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Counting the number of times a specific character appears in a cell (https://www.excelbanter.com/excel-worksheet-functions/53601-counting-number-times-specific-character-appears-cell.html)

PCLIVE

Counting the number of times a specific character appears in a cell
 
Is there a function that I can use to determine the number of times the
letter "Y" appears in a single cell?

Thanks,
Paul



Domenic

Counting the number of times a specific character appears in a cell
 
Try...

=LEN(A1)-LEN(SUBSTITUTE(A1,"Y",""))

....which is case-sensitive. If you don't want it to be case-sensitive,
try the following instead...

=LEN(A1)-LEN(SUBSTITUTE(UPPER(A1),"Y",""))

or

=LEN(A1)-LEN(SUBSTITUTE(UPPER(A1),UPPER(B1),""))

....where B1 contains the letter of interest.

Hope this helps!

In article ,
"PCLIVE" wrote:

Is there a function that I can use to determine the number of times the
letter "Y" appears in a single cell?

Thanks,
Paul


PCLIVE

Counting the number of times a specific character appears in a cell
 
Works great!

Thanks,
Paul

"Domenic" wrote in message
...
Try...

=LEN(A1)-LEN(SUBSTITUTE(A1,"Y",""))

...which is case-sensitive. If you don't want it to be case-sensitive,
try the following instead...

=LEN(A1)-LEN(SUBSTITUTE(UPPER(A1),"Y",""))

or

=LEN(A1)-LEN(SUBSTITUTE(UPPER(A1),UPPER(B1),""))

...where B1 contains the letter of interest.

Hope this helps!

In article ,
"PCLIVE" wrote:

Is there a function that I can use to determine the number of times the
letter "Y" appears in a single cell?

Thanks,
Paul




Ashish Mathur

Counting the number of times a specific character appears in a cel
 
Hi,

You may try the following array formula (Ctrl+Shift+Enter)

=COUNT(IF(MID($C$4,ROW(1:20),1)="y",1))

$C$4 isthe cell containing the word in which you want to count the y's

Regards,

Ashish Mathur

"PCLIVE" wrote:

Is there a function that I can use to determine the number of times the
letter "Y" appears in a single cell?

Thanks,
Paul





All times are GMT +1. The time now is 05:39 PM.

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