Counting non-numeric values

P

paljowestsub

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
 
N

Niek Otten

Hi Joe,

Look in HELP for the COUNTIF() function

--
Kind regards,

Niek Otten
Microsoft MVP - Excel

|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
 
R

Ron Rosenfeld

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

Look at help for COUNTIF
--ron
 
R

Ron Coderre

Try something like this:

=COUNTIF(A1:Z1,"X")

Does that help?
--------------------------

Regards,

Ron
Microsoft MVP (Excel)
(XL2003, Win XP)
 
J

JE McGimpsey

One way:

=COUNTA(2:2)

or, if you *only* want to count x's:

=COUNTIF(2:2,"x")
 
R

RagDyeR

You did say ROW, right?

For an *entire* row, say Row5:

=Countif(5:5,"x")

For a range of cells within Row5:

=Countif(C5:Y5,"x")

--

HTH,

RD
=====================================================
Please keep all correspondence within the Group, so all may benefit!
=====================================================

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
 
C

Chip Pearson

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)
 
R

ryanb.

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?
_________________
one way:

assuming X's in row 1

=COUNTIF(1:1,"X")

HTH
 
R

Rick Rothstein \(MVP - VB\)

Assuming your row is Row 1....

=COUNTIF(1:1,"=x")

Change the two 1's to whatever row number your x's are in.

Rick
 
R

Rick Rothstein \(MVP - VB\)

Did anyone else see a delay in the posting of the responses to this thread?
When I answered the OP, there were no other messages posted to the thread. I
went to eat supper about 25 minutes ago and I was the only message posted in
this thread. I just came back, refreshed the newsreader and... whoom... nine
messages popped up.

Rick
 
R

Ron Rosenfeld

Did anyone else see a delay in the posting of the responses to this thread?
When I answered the OP, there were no other messages posted to the thread. I
went to eat supper about 25 minutes ago and I was the only message posted in
this thread. I just came back, refreshed the newsreader and... whoom... nine
messages popped up.

Rick

I did not see any delay. When I downloaded I did not see any responses. But
Niek and I both apparently posted at 3:55 PM EST.

By the way, Rick, the "=x" in your solution can be replaced merely by "x"
--ron
 
R

Rick Rothstein \(MVP - VB\)

Did anyone else see a delay in the posting of the responses to this
I did not see any delay. When I downloaded I did not see any responses.
But
Niek and I both apparently posted at 3:55 PM EST.

Hmm! Thanks for the follow-up. I wonder why I saw the delay. I set up a
direct account to the microsoft news server, so its not like my ISP could
have been responsible or anything. Oh well, I guess its just one of those
mysteries of life or something.
By the way, Rick, the "=x" in your solution can be replaced merely by "x"

Yeah, I know... I just forgot about that when I created the response. <g>

Rick
 
T

T. Valko

I saw a delay.

Using OE, there were no replies posted when I replied. After my reply didn't
show up I started looking around. CDO showed only Chip's reply. Google
Groups also didn't show any replies.
 
P

paljowestsub

Thank you Very much! That did it!
--
JP


Chip Pearson said:
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)
 
P

paljowestsub

Thank you very much! That did it!
--
JP


Ron Coderre said:
Try something like this:

=COUNTIF(A1:Z1,"X")

Does that help?
--------------------------

Regards,

Ron
Microsoft MVP (Excel)
(XL2003, Win XP)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top