#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 100
Default Countif

Can you use a range of cells, A2:I25, that includes blank cells and still
count the instances of "apple"?
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Countif

Sure.

=countif(a2:i25,"apple")
will still count the number of cells that equal Apple even if there are empty
cells in that range.

But I'm guessing that something isn't working for you.

Any chance you have extra spaces in those cells with Apple in them?

M.A.Tyler wrote:

Can you use a range of cells, A2:I25, that includes blank cells and still
count the instances of "apple"?


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 100
Default Countif

No it's not working.
Not sure what you mean by extra spaces?
I've tryed the same formula you suggested except "apple" is J2, it gives me
an answer of 0, which is incorrect. thought it had something to do with the
empty cells?

"Dave Peterson" wrote:

Sure.

=countif(a2:i25,"apple")
will still count the number of cells that equal Apple even if there are empty
cells in that range.

But I'm guessing that something isn't working for you.

Any chance you have extra spaces in those cells with Apple in them?

M.A.Tyler wrote:

Can you use a range of cells, A2:I25, that includes blank cells and still
count the instances of "apple"?


--

Dave Peterson

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3
Default Countif

I believe Mr. Peterson is referring to leading or trailing spaces in the
cells containing "Apple" which could be visably obscured by cell formatting,
i.e. " Apple ", " Apple", or "Apple ", etc.
hth,
jay
"M.A.Tyler" <Great Lakes State wrote in message
...
No it's not working.
Not sure what you mean by extra spaces?
I've tryed the same formula you suggested except "apple" is J2, it gives
me
an answer of 0, which is incorrect. thought it had something to do with
the
empty cells?

"Dave Peterson" wrote:

Sure.

=countif(a2:i25,"apple")
will still count the number of cells that equal Apple even if there are
empty
cells in that range.

But I'm guessing that something isn't working for you.

Any chance you have extra spaces in those cells with Apple in them?

M.A.Tyler wrote:

Can you use a range of cells, A2:I25, that includes blank cells and
still
count the instances of "apple"?


--

Dave Peterson


  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,346
Default Countif

Hi,

Try

=COUNTIF(A2:I25,"*apple*")

Note that this will not count the following as 2 items

Red apples and green apples.

In that case it will count the entry once.

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

Cheers,
Shane Devenshire


"M.A.Tyler" wrote:

No it's not working.
Not sure what you mean by extra spaces?
I've tryed the same formula you suggested except "apple" is J2, it gives me
an answer of 0, which is incorrect. thought it had something to do with the
empty cells?

"Dave Peterson" wrote:

Sure.

=countif(a2:i25,"apple")
will still count the number of cells that equal Apple even if there are empty
cells in that range.

But I'm guessing that something isn't working for you.

Any chance you have extra spaces in those cells with Apple in them?

M.A.Tyler wrote:

Can you use a range of cells, A2:I25, that includes blank cells and still
count the instances of "apple"?


--

Dave Peterson



  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 100
Default Countif

There is some kind of trouble, I can get =countif(A2:G25) to work, but if I
add columns H and I it returns zero. Is there a way to check for extra
spaces, or some kind of formatting problem?

"Dave Peterson" wrote:

Sure.

=countif(a2:i25,"apple")
will still count the number of cells that equal Apple even if there are empty
cells in that range.

But I'm guessing that something isn't working for you.

Any chance you have extra spaces in those cells with Apple in them?

M.A.Tyler wrote:

Can you use a range of cells, A2:I25, that includes blank cells and still
count the instances of "apple"?


--

Dave Peterson

  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3
Default Countif

How are you adding columns H and I? Does the cell with the countif function
change when you add the columns?

jay
"M.A.Tyler" <Great Lakes State wrote in message
...
There is some kind of trouble, I can get =countif(A2:G25) to work, but if
I
add columns H and I it returns zero. Is there a way to check for extra
spaces, or some kind of formatting problem?

"Dave Peterson" wrote:

Sure.

=countif(a2:i25,"apple")
will still count the number of cells that equal Apple even if there are
empty
cells in that range.

But I'm guessing that something isn't working for you.

Any chance you have extra spaces in those cells with Apple in them?

M.A.Tyler wrote:

Can you use a range of cells, A2:I25, that includes blank cells and
still
count the instances of "apple"?


--

Dave Peterson


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
How do I use a countif function according to two other countif fu. Kirsty Excel Worksheet Functions 2 February 20th 06 11:44 AM
edit this =COUNTIF(A1:F16,"*1-2*")+COUNTIF(A1:F16,"*2-1*") sctroy Excel Discussion (Misc queries) 2 September 25th 05 04:13 AM
COUNTIF or not to COUNTIF on a range in another sheet Ellie Excel Worksheet Functions 4 September 15th 05 10:06 PM
CountIF Carlos Excel Worksheet Functions 9 July 4th 05 11:38 AM
COUNTIF in one colum then COUNTIF in another...??? JonnieP Excel Worksheet Functions 3 February 22nd 05 02:55 PM


All times are GMT +1. The time now is 07:50 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"