#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 19
Default COUNTIF Function

Using Excel 2002
I have rows of data with values in cells. I would like to count the number
of times the letter X appears in each column. Using the COUNTIF function in
the following manner reports a value of zero. The formula is in cell B22:
=COUNTIF(B2:B21,"X"). In column B there are ten instances of the letter X.
Can someone help? Thanks!


  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,311
Default COUNTIF Function

Do those cells contain other letters or characters, including spaces?

If so and you want to count those, then you might try:
=COUNTIF(B2:B21,"*X*")

Regards,
Paul
--

"PatJennings" wrote in message
...
Using Excel 2002
I have rows of data with values in cells. I would like to count the
number of times the letter X appears in each column. Using the COUNTIF
function in the following manner reports a value of zero. The formula is
in cell B22: =COUNTIF(B2:B21,"X"). In column B there are ten instances of
the letter X. Can someone help? Thanks!



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,718
Default COUNTIF Function

You may have leading or trailing spaces

=COUNTIF(B2:B21,"*X*")



"PatJennings" wrote:

Using Excel 2002
I have rows of data with values in cells. I would like to count the number
of times the letter X appears in each column. Using the COUNTIF function in
the following manner reports a value of zero. The formula is in cell B22:
=COUNTIF(B2:B21,"X"). In column B there are ten instances of the letter X.
Can someone help? Thanks!



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,388
Default COUNTIF Function

Hi,
Your data may be contaminated with spaces.
To test for this, temporarily modify your formula to:
=COUNTIF(B2:B21,"*X*")
Does that change the count?
Regards - Dave.
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 19
Default COUNTIF Function

W O W ! ! !
Thanks to all for the immediate response. The adjustment to the formula did
the trick.

"Dave" wrote in message
...
Hi,
Your data may be contaminated with spaces.
To test for this, temporarily modify your formula to:
=COUNTIF(B2:B21,"*X*")
Does that change the count?
Regards - Dave.





Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Use of the COUNTIF function JCameron Excel Worksheet Functions 11 January 24th 09 04:42 AM
please help how to combine IF function with Countif function Dinesh Excel Worksheet Functions 6 March 30th 06 08:28 PM
How do I use a countif function according to two other countif fu. Kirsty Excel Worksheet Functions 2 February 20th 06 11:44 AM
Embed a countif function in subtotal function? Stuck at work Excel Worksheet Functions 1 February 14th 06 03:19 AM
help with the countif function!! AtlantaMegan Excel Worksheet Functions 2 July 7th 05 03:29 AM


All times are GMT +1. The time now is 12:59 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"