ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   countif function: how to distinguish case/make case sensitive (https://www.excelbanter.com/excel-worksheet-functions/224776-countif-function-how-distinguish-case-make-case-sensitive.html)

mvwoolner

countif function: how to distinguish case/make case sensitive
 
Is there a way to make the countif function case sensitive? If cell A1 has a
'c' in it and cell a2 has a 'C' in it, how can I make =countif(A1:A2,'C')
give the value 1?

Francis

countif function: how to distinguish case/make case sensitive
 
try this array formula, confirm by Ctrl,Shift and Enter

=SUM(IF(EXACT(A2:A5,"C"),1))
--
Hope this is helpful

Pls click the Yes button below if this post provide answer you have asked
An ordinary user helping another ordinary user and learn together

Thank You

cheers, francis



"mvwoolner" wrote:

Is there a way to make the countif function case sensitive? If cell A1 has a
'c' in it and cell a2 has a 'C' in it, how can I make =countif(A1:A2,'C')
give the value 1?


Shane Devenshire

countif function: how to distinguish case/make case sensitive
 
Hi,

=SUMPRODUCT(--EXACT(A1:A4,"C"))

or

=SUMPRODUCT(--EXACT(A1:A4,B1))

where B1 contains C or c or whatever.


--
If this helps, please click the Yes button.

Cheers,
Shane Devenshire


"mvwoolner" wrote:

Is there a way to make the countif function case sensitive? If cell A1 has a
'c' in it and cell a2 has a 'C' in it, how can I make =countif(A1:A2,'C')
give the value 1?


Shane Devenshire

countif function: how to distinguish case/make case sensitive
 
Hi,

=SUMPRODUCT(--EXACT(A1:A4,"C"))

or

=SUMPRODUCT(--EXACT(A1:A4,B1))

where B1 contains C or c or whatever.
--
If this helps, please click the Yes button.

Cheers,
Shane Devenshire


"mvwoolner" wrote:

Is there a way to make the countif function case sensitive? If cell A1 has a
'c' in it and cell a2 has a 'C' in it, how can I make =countif(A1:A2,'C')
give the value 1?



All times are GMT +1. The time now is 02:28 AM.

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