Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Jen Jen is offline
external usenet poster
 
Posts: 119
Default COUNT returning 0?

I have a spreadsheet with several hundred records in Excel 2000. I have
autofilter turned on, and I've filtered by one of my headings. Now I want to
count the rows that are left - should be easy, right?

However, when I use the COUNT function (=COUNT(D1:D351)), I always get 0.

Since I also want to count the number of rows with one field empty, I also
tried using a COUNTIF on that (in a different column), and it still returns
0.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,268
Default COUNT returning 0?

Try


=SUBTOTAL(3.D1:D500)


--


Regards,


Peo Sjoblom


"Jen" wrote in message
...
I have a spreadsheet with several hundred records in Excel 2000. I have
autofilter turned on, and I've filtered by one of my headings. Now I want
to
count the rows that are left - should be easy, right?

However, when I use the COUNT function (=COUNT(D1:D351)), I always get 0.

Since I also want to count the number of rows with one field empty, I also
tried using a COUNTIF on that (in a different column), and it still
returns
0.

What am I doing wrong? I've used COUNT lots of times before, but not in
this
worksheet. Could there be some setting that's screwing things up?



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,856
Default COUNT returning 0?

You should use the SUBTOTAL function. It helps to insert a new row
above your headings, so that you can always see it, and then use:

=SUBTOTAL(2,D3:D500)
or
=SUBTOTAL(3,D3:D500)

Assuming D is the column in question. The 2 parameter in the first
formula is equivalent to COUNT, and the 3 is equivalent to COUNTA.
They will count only the visible rows after filtering. There are 11
values which can be used with SUBTOTAL to give different functions (eg
9 is equivalent to SUM), and in later versions you can add 100 to the
parameter to exclude rows which have been manually hidden.

Hope this helps.

Pete

On Oct 25, 6:36 pm, Jen wrote:
I have a spreadsheet with several hundred records in Excel 2000. I have
autofilter turned on, and I've filtered by one of my headings. Now I want to
count the rows that are left - should be easy, right?

However, when I use the COUNT function (=COUNT(D1:D351)), I always get 0.

Since I also want to count the number of rows with one field empty, I also
tried using a COUNTIF on that (in a different column), and it still returns
0.

What am I doing wrong? I've used COUNT lots of times before, but not in this
worksheet. Could there be some setting that's screwing things up?



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 22,906
Default COUNT returning 0?

For autofiltered row count use the SUBTOTAL function.

=SUBTOTAL(2,range) which is the equivalent of COUNT

=SUBTOTAL(3,range) which is the equivalent of COUNTA

For more see help


Gord Dibben MS Excel MVP

On Thu, 25 Oct 2007 10:36:06 -0700, Jen wrote:

I have a spreadsheet with several hundred records in Excel 2000. I have
autofilter turned on, and I've filtered by one of my headings. Now I want to
count the rows that are left - should be easy, right?

However, when I use the COUNT function (=COUNT(D1:D351)), I always get 0.

Since I also want to count the number of rows with one field empty, I also
tried using a COUNTIF on that (in a different column), and it still returns
0.

What am I doing wrong? I've used COUNT lots of times before, but not in this
worksheet. Could there be some setting that's screwing things up?


  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Jen Jen is offline
external usenet poster
 
Posts: 119
Default COUNT returning 0?

Thanks for all these responses - works great!

"Gord Dibben" wrote:

For autofiltered row count use the SUBTOTAL function.

=SUBTOTAL(2,range) which is the equivalent of COUNT

=SUBTOTAL(3,range) which is the equivalent of COUNTA

For more see help


Gord Dibben MS Excel MVP

On Thu, 25 Oct 2007 10:36:06 -0700, Jen wrote:

I have a spreadsheet with several hundred records in Excel 2000. I have
autofilter turned on, and I've filtered by one of my headings. Now I want to
count the rows that are left - should be easy, right?

However, when I use the COUNT function (=COUNT(D1:D351)), I always get 0.

Since I also want to count the number of rows with one field empty, I also
tried using a COUNTIF on that (in a different column), and it still returns
0.

What am I doing wrong? I've used COUNT lots of times before, but not in this
worksheet. Could there be some setting that's screwing things up?



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 Employee Work Time - Don't Double-count Overlapping Apts. J Excel Worksheet Functions 0 April 27th 07 05:52 AM
Excel 2000, count, sort a list & count totals? sunslight Excel Worksheet Functions 1 April 9th 07 05:46 PM
Count Intervals of 2 Consecutive Values in same Row and Return Count across Row Sam via OfficeKB.com Excel Worksheet Functions 6 November 29th 05 03:27 PM
Count Intervals of Filtered TEXT values in Column and Return Count across a Row Sam via OfficeKB.com Excel Worksheet Functions 9 July 31st 05 03:37 AM
returning a count if two conditions are met davmason Excel Worksheet Functions 5 July 17th 05 04:25 AM


All times are GMT +1. The time now is 09:30 AM.

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"