ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   {=COUNT(--ISNUMBER(G95:G98))} (https://www.excelbanter.com/excel-discussion-misc-queries/133797-%7B%3Dcount-isnumber-g95-g98-%7D.html)

Dave F

{=COUNT(--ISNUMBER(G95:G98))}
 
G95 = 1
G96 = e
G97 = 2
G98 = 3

The count of numbers should be 3. However, I get 4. G96 is formatted as
General. =ISNUMBER(G96) resolves to FALSE.

So???
--
A hint to posters: Specific, detailed questions are more likely to be
answered than questions that provide no detail about your problem.

Dave F

{=COUNT(--ISNUMBER(G95:G98))}
 
But =SUMPRODUCT(--ISNUMBER(G95:G98)) resolves correctly.

Color me confused.
--
A hint to posters: Specific, detailed questions are more likely to be
answered than questions that provide no detail about your problem.


"Dave F" wrote:

G95 = 1
G96 = e
G97 = 2
G98 = 3

The count of numbers should be 3. However, I get 4. G96 is formatted as
General. =ISNUMBER(G96) resolves to FALSE.

So???
--
A hint to posters: Specific, detailed questions are more likely to be
answered than questions that provide no detail about your problem.


Dave F

{=COUNT(--ISNUMBER(G95:G98))}
 
OK, I figured this out. COUNT counts ALL the 1s and 0s that the -- returns.
Not just the 1s. Duh.

Apologies.

Dave
--
A hint to posters: Specific, detailed questions are more likely to be
answered than questions that provide no detail about your problem.


"Dave F" wrote:

G95 = 1
G96 = e
G97 = 2
G98 = 3

The count of numbers should be 3. However, I get 4. G96 is formatted as
General. =ISNUMBER(G96) resolves to FALSE.

So???
--
A hint to posters: Specific, detailed questions are more likely to be
answered than questions that provide no detail about your problem.


David Biddulph[_2_]

{=COUNT(--ISNUMBER(G95:G98))}
 
You've got 3 cells with TRUE (which you've converted to 1), and one cell
with FALSE (which you've converted to zero).
Zero and one are both numbers so are counted by the COUNT() function.

If you did =COUNT(G95:G98) you presumably get 3?
--
David Biddulph

"Dave F" wrote in message
...
G95 = 1
G96 = e
G97 = 2
G98 = 3

The count of numbers should be 3. However, I get 4. G96 is formatted as
General. =ISNUMBER(G96) resolves to FALSE.

So???
--
A hint to posters: Specific, detailed questions are more likely to be
answered than questions that provide no detail about your problem.




David Biddulph[_2_]

{=COUNT(--ISNUMBER(G95:G98))}
 
Yes, that's right, 3 ones and one zero add up to 3.
Your other formula counted all 4, as one and zero are both numbers, so valid
for the COUNT() function.
--
David Biddulph

"Dave F" wrote in message
...
But =SUMPRODUCT(--ISNUMBER(G95:G98)) resolves correctly.

Color me confused.
--
A hint to posters: Specific, detailed questions are more likely to be
answered than questions that provide no detail about your problem.


"Dave F" wrote:

G95 = 1
G96 = e
G97 = 2
G98 = 3

The count of numbers should be 3. However, I get 4. G96 is formatted as
General. =ISNUMBER(G96) resolves to FALSE.

So???
--
A hint to posters: Specific, detailed questions are more likely to be
answered than questions that provide no detail about your problem.




Billy Liddel

{=COUNT(--ISNUMBER(G95:G98))}
 
Hi
{=COUNT(--ISNUMBER(G95:G98))}, an array formula, counts the range
whether or not the data is a number, just like COUNTA

Peter

"Dave F" wrote:

OK, I figured this out. COUNT counts ALL the 1s and 0s that the -- returns.
Not just the 1s. Duh.

Apologies.

Dave
--
A hint to posters: Specific, detailed questions are more likely to be
answered than questions that provide no detail about your problem.


"Dave F" wrote:

G95 = 1
G96 = e
G97 = 2
G98 = 3

The count of numbers should be 3. However, I get 4. G96 is formatted as
General. =ISNUMBER(G96) resolves to FALSE.

So???
--
A hint to posters: Specific, detailed questions are more likely to be
answered than questions that provide no detail about your problem.


Dave F

{=COUNT(--ISNUMBER(G95:G98))}
 
Yes, thanks. That should have been obvious to me.

Been a long day!
--
A hint to posters: Specific, detailed questions are more likely to be
answered than questions that provide no detail about your problem.


"David Biddulph" wrote:

You've got 3 cells with TRUE (which you've converted to 1), and one cell
with FALSE (which you've converted to zero).
Zero and one are both numbers so are counted by the COUNT() function.

If you did =COUNT(G95:G98) you presumably get 3?
--
David Biddulph

"Dave F" wrote in message
...
G95 = 1
G96 = e
G97 = 2
G98 = 3

The count of numbers should be 3. However, I get 4. G96 is formatted as
General. =ISNUMBER(G96) resolves to FALSE.

So???
--
A hint to posters: Specific, detailed questions are more likely to be
answered than questions that provide no detail about your problem.





Dave F

{=COUNT(--ISNUMBER(G95:G98))}
 
No, the issue is that the -- coerces the ISNUMBER function to return 1s for
TRUE and 0s for FALSE and so COUNT counts ALL the 1s and 0s. That COUNT may
or may not function like COUNTA in this instance is not the issue. COUNT is
only counting numbers here.

Dave
--
A hint to posters: Specific, detailed questions are more likely to be
answered than questions that provide no detail about your problem.


"Billy Liddel" wrote:

Hi
{=COUNT(--ISNUMBER(G95:G98))}, an array formula, counts the range
whether or not the data is a number, just like COUNTA

Peter

"Dave F" wrote:

OK, I figured this out. COUNT counts ALL the 1s and 0s that the -- returns.
Not just the 1s. Duh.

Apologies.

Dave
--
A hint to posters: Specific, detailed questions are more likely to be
answered than questions that provide no detail about your problem.


"Dave F" wrote:

G95 = 1
G96 = e
G97 = 2
G98 = 3

The count of numbers should be 3. However, I get 4. G96 is formatted as
General. =ISNUMBER(G96) resolves to FALSE.

So???
--
A hint to posters: Specific, detailed questions are more likely to be
answered than questions that provide no detail about your problem.


T. Valko

{=COUNT(--ISNUMBER(G95:G98))}
 
I would probably always use Sumproduct, but this array formula will work:

=COUNT(1/ISNUMBER(A1:A5))

Biff

"Dave F" wrote in message
...
OK, I figured this out. COUNT counts ALL the 1s and 0s that the --
returns.
Not just the 1s. Duh.

Apologies.

Dave
--
A hint to posters: Specific, detailed questions are more likely to be
answered than questions that provide no detail about your problem.


"Dave F" wrote:

G95 = 1
G96 = e
G97 = 2
G98 = 3

The count of numbers should be 3. However, I get 4. G96 is formatted as
General. =ISNUMBER(G96) resolves to FALSE.

So???
--
A hint to posters: Specific, detailed questions are more likely to be
answered than questions that provide no detail about your problem.





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

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