ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Countif (https://www.excelbanter.com/excel-discussion-misc-queries/225103-countif.html)

M.A.Tyler

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

Dave Peterson

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

M.A.Tyler

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


Jay Emory

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



Shane Devenshire[_2_]

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


M.A.Tyler

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


Jay Emory

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




All times are GMT +1. The time now is 11:53 AM.

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