Try the following....
To count the number of cells that are not empty:
=SUBTOTAL(3,A2:A10)
To count the number of cells that contain a specific text string:
=SUMPRODUCT(SUBTOTAL(3,OFFSET(A2:A10,ROW(A2:A10)-MIN(ROW(A2:A10)),0,1)),(
A2:A10="Text String")+0)
Hope this helps!
In article ,
"hagan" wrote:
Hi Don,
I tried the SUBTOTAL function but it seems to be better suited for using
this function on numbers in cells of a filtered spreadsheet, but I'm looking
for a way to count the number of rows shown after a document has been
filtered. None of my columns have numbers for me to use the SUBTOTAL
function with the COUNT or COUNTA options. Do you have any other
suggestions, or is there a way to tweak the SUBTOTAL function to count a text
string.
Hagan
|