#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 70
Default COUNT function

The following example is from Microsoft documentation.

Enter the following information in the quoted cells.

A2 Sales
A3 12/08/2008
A4
A5 19
A6 22.24
A7 TRUE
A8 #DIV/0!

Cell A4 is blank (contains nothing / no value).

In cell A12 (can be any cell) enter the following formula:-

=COUNT(A2:A8,2)

The above formula returns 4.

Why does it return 4?

According the Microsoft documentation:-

Counts the number of cells that contain numbers in the list, and the value 2
(4)

I reckon the answer should be (interpreting MS dcoumentation literally) 5
broken down as follows:-

A3 is 1.
A5 is 1.
A6 is 1.
A3 contains a 2 therefore count 1.
A6 contains a 2 therefore count 1.

I make that a total of 5.

Why then does the formula return 4?

Thanks for any help.

Steve

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,520
Default COUNT function

COUNT() counts the number of cells that contain numbers.
Here A3,A5,A6 and the number you have added to the formula ie 2 is counted.

What you are looking for is COUNTIF() .
=COUNTIF(A2:A8,2) returns the number of cells with ** cell value *** 2. 12
or 23 will not be counted..

If this post helps click Yes
---------------
Jacob Skaria


"trip_to_tokyo" wrote:

The following example is from Microsoft documentation.

Enter the following information in the quoted cells.

A2 Sales
A3 12/08/2008
A4
A5 19
A6 22.24
A7 TRUE
A8 #DIV/0!

Cell A4 is blank (contains nothing / no value).

In cell A12 (can be any cell) enter the following formula:-

=COUNT(A2:A8,2)

The above formula returns 4.

Why does it return 4?

According the Microsoft documentation:-

Counts the number of cells that contain numbers in the list, and the value 2
(4)

I reckon the answer should be (interpreting MS dcoumentation literally) 5
broken down as follows:-

A3 is 1.
A5 is 1.
A6 is 1.
A3 contains a 2 therefore count 1.
A6 contains a 2 therefore count 1.

I make that a total of 5.

Why then does the formula return 4?

Thanks for any help.

Steve

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,520
Default COUNT function

May be to avoid confusion you can try which will count the numbers in A2:A8
and the 3 numbers specified in the formula .Also refer the help on COUNTIF()

=COUNT(A2:A8,2,3,4)
--
If this post helps click Yes
---------------
Jacob Skaria


"Jacob Skaria" wrote:

COUNT() counts the number of cells that contain numbers.
Here A3,A5,A6 and the number you have added to the formula ie 2 is counted.

What you are looking for is COUNTIF() .
=COUNTIF(A2:A8,2) returns the number of cells with ** cell value *** 2. 12
or 23 will not be counted..

If this post helps click Yes
---------------
Jacob Skaria


"trip_to_tokyo" wrote:

The following example is from Microsoft documentation.

Enter the following information in the quoted cells.

A2 Sales
A3 12/08/2008
A4
A5 19
A6 22.24
A7 TRUE
A8 #DIV/0!

Cell A4 is blank (contains nothing / no value).

In cell A12 (can be any cell) enter the following formula:-

=COUNT(A2:A8,2)

The above formula returns 4.

Why does it return 4?

According the Microsoft documentation:-

Counts the number of cells that contain numbers in the list, and the value 2
(4)

I reckon the answer should be (interpreting MS dcoumentation literally) 5
broken down as follows:-

A3 is 1.
A5 is 1.
A6 is 1.
A3 contains a 2 therefore count 1.
A6 contains a 2 therefore count 1.

I make that a total of 5.

Why then does the formula return 4?

Thanks for any help.

Steve

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
Count Function Mickey Excel Worksheet Functions 5 November 12th 08 11:55 PM
COUNT function scott Excel Worksheet Functions 1 September 10th 08 07:16 PM
count function further AJ Patel[_2_] Excel Worksheet Functions 5 March 12th 08 01:23 AM
COUNT IF FUNCTION nperpill Excel Worksheet Functions 2 January 10th 07 04:43 PM
count function kckar Excel Discussion (Misc queries) 4 February 15th 06 11:28 PM


All times are GMT +1. The time now is 05:39 PM.

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

About Us

"It's about Microsoft Excel"