View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Peo Sjoblom[_3_] Peo Sjoblom[_3_] is offline
external usenet poster
 
Posts: 136
Default Counting only displayed cells in the column

If you have Excel 2003 and later you can use subtotal


=SUBTOTAL(103,A1:A1000)


will count either text or number and only visible cells in A1:A1000, for
earlier versions you would need code to create a User Defined Function (UDF)

Look up help for the SUBTOTAL function if you have 2003-2007 there you can
see all the different things you can count or calculate like sum, average
etc

--


Regards,


Peo Sjoblom


"CEG_Staffer" wrote in message
...
I have a worksheet that I would like to be able to count only the displayed
cells in a column i.e. I do not want to count hidden cells (rows). If all
rows are displayed the total count should equal all rows with contents
(counta function), if not - count only those rows displayed.