ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Count the occurance of upper or lower case letters (https://www.excelbanter.com/excel-worksheet-functions/9181-count-occurance-upper-lower-case-letters.html)

Sivsy

Count the occurance of upper or lower case letters
 
Is there a way to distinguish between and count the occurance of lower and
upper case letters in an array ? eg If I have a series of columns populated
with either uppercase "S" or loercase "s", can i use a formula to count the
occurance of each type ?

Aladin Akyurek

=SUMPRODUCT(--(EXACT(A1:A5,"S")))

Sivsy wrote:
Is there a way to distinguish between and count the occurance of lower and
upper case letters in an array ? eg If I have a series of columns populated
with either uppercase "S" or loercase "s", can i use a formula to count the
occurance of each type ?


Bob Phillips

Sivsy,

This will count cells starting with a lower case s

=SUMPRODUCT(--(ISNUMBER(FIND("s",LEFT(A1:A18,1)))))

If you want only s, then use

=SUMPRODUCT(--(ISNUMBER(FIND("s",LEFT(A1:A18,1)))),--(LEN(A1:A18)=1))

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Sivsy" wrote in message
...
Is there a way to distinguish between and count the occurance of lower and
upper case letters in an array ? eg If I have a series of columns

populated
with either uppercase "S" or loercase "s", can i use a formula to count

the
occurance of each type ?




Ken Wright

Also if you just wanted a count of all the lowercase letters regardless of
what they are, then assuming no blanks

=SUMPRODUCT(--(CODE(A1:L100)=97))

--
Regards
Ken....................... Microsoft MVP - Excel
Sys Spec - Win XP Pro / XL 97/00/02/03

----------------------------------------------------------------------------
It's easier to beg forgiveness than ask permission :-)
----------------------------------------------------------------------------

"Sivsy" wrote in message
...
Is there a way to distinguish between and count the occurance of lower and
upper case letters in an array ? eg If I have a series of columns

populated
with either uppercase "S" or loercase "s", can i use a formula to count

the
occurance of each type ?





All times are GMT +1. The time now is 03:57 AM.

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