ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Counting non-numeric values (https://www.excelbanter.com/excel-discussion-misc-queries/171238-re-counting-non-numeric-values.html)

Chip Pearson

Counting non-numeric values
 
If you want to count the cells that have only either an upper or lower case
'x' in them, use

=COUNTIF(A7:K7,"x")

If you need to distinguish between upper and lower case, use the following
array formula and change the case of the 'x' character to the desired case

=SUM(--(EXACT(A7:K7,"X")))

Since this second formula is an array formula, you must press CTRL SHIFT
ENTER rather than just ENTER when you first enter the formula and whenever
you edit it later. If you do this properly, Excel will display the formula
in the formula bar enclosed in curly braces { }. See
http://www.cpearson.com/Excel/ArrayFormulas.aspx for more info about array
formulas.

If you want to count the cells that have an 'x' character anywhere,
including values with other characters (e.g., 'AbxC') use

=COUNTIF(A7:K7,"*x*")


--
Cordially,
Chip Pearson
Microsoft MVP - Excel, 10 Years
Pearson Software Consulting
www.cpearson.com
(email on the web site)



"paljowestsub" wrote in message
...
I have a spreadsheet with the letter x in various cells. I want to count
the
number of x's in a particular row of cells. What formula do I use and how
do
I structure the formula?

Thank you!
Joe Palczynski



paljowestsub

Counting non-numeric values
 
Thank you Very much! That did it!
--
JP


"Chip Pearson" wrote:

If you want to count the cells that have only either an upper or lower case
'x' in them, use

=COUNTIF(A7:K7,"x")

If you need to distinguish between upper and lower case, use the following
array formula and change the case of the 'x' character to the desired case

=SUM(--(EXACT(A7:K7,"X")))

Since this second formula is an array formula, you must press CTRL SHIFT
ENTER rather than just ENTER when you first enter the formula and whenever
you edit it later. If you do this properly, Excel will display the formula
in the formula bar enclosed in curly braces { }. See
http://www.cpearson.com/Excel/ArrayFormulas.aspx for more info about array
formulas.

If you want to count the cells that have an 'x' character anywhere,
including values with other characters (e.g., 'AbxC') use

=COUNTIF(A7:K7,"*x*")


--
Cordially,
Chip Pearson
Microsoft MVP - Excel, 10 Years
Pearson Software Consulting
www.cpearson.com
(email on the web site)



"paljowestsub" wrote in message
...
I have a spreadsheet with the letter x in various cells. I want to count
the
number of x's in a particular row of cells. What formula do I use and how
do
I structure the formula?

Thank you!
Joe Palczynski




All times are GMT +1. The time now is 02:22 PM.

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