ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Counting lines when using a filter (https://www.excelbanter.com/excel-discussion-misc-queries/33820-counting-lines-when-using-filter.html)

hagan

Counting lines when using a filter
 
After using a filter to view certain rows of a spreadsheet, is there a way to
get an accurate count of how many rows are shown by either clicking and
dragging the mouse over the selection or clicking on the first row and then
shift-click on the last row?

Thanks in advance,
Hagan

Don Guillett

How about using SUBTOTAL function

--
Don Guillett
SalesAid Software

"hagan" wrote in message
...
After using a filter to view certain rows of a spreadsheet, is there a way

to
get an accurate count of how many rows are shown by either clicking and
dragging the mouse over the selection or clicking on the first row and

then
shift-click on the last row?

Thanks in advance,
Hagan




olasa


Right click on the bottom status bar, and select Count
See encl. pictu
http://www.excelforum.com/attachment...tid=3569&stc=1
HTH
Ola


+-------------------------------------------------------------------+
|Filename: Clipboard01.jpg |
|Download: http://www.excelforum.com/attachment.php?postid=3569 |
+-------------------------------------------------------------------+

--
olasa
------------------------------------------------------------------------
olasa's Profile: http://www.excelforum.com/member.php...o&userid=17760
View this thread: http://www.excelforum.com/showthread...hreadid=384605


hagan

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

"Don Guillett" wrote:

How about using SUBTOTAL function

--
Don Guillett
SalesAid Software

"hagan" wrote in message
...
After using a filter to view certain rows of a spreadsheet, is there a way

to
get an accurate count of how many rows are shown by either clicking and
dragging the mouse over the selection or clicking on the first row and

then
shift-click on the last row?

Thanks in advance,
Hagan





Domenic

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


Gord Dibben

Just highlight the visible rows and right-click on the status bar and select
"count".

Won't count rows hidden by filter.


Gord Dibben Excel MVP

On Tue, 5 Jul 2005 09:35:06 -0700, "hagan"
wrote:

After using a filter to view certain rows of a spreadsheet, is there a way to
get an accurate count of how many rows are shown by either clicking and
dragging the mouse over the selection or clicking on the first row and then
shift-click on the last row?

Thanks in advance,
Hagan



hagan

Domenic,

Worked like a charm...a little trickier than what I was looking for, but
it worked. However, the 2 replies after yours were a little simpler.

Thanks,
Hagan

"Domenic" wrote:

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



hagan

Olasa,

That works!! Thank you for your help.

Hagan

"olasa" wrote:


Right click on the bottom status bar, and select Count
See encl. pictu
http://www.excelforum.com/attachment...tid=3569&stc=1
HTH
Ola


+-------------------------------------------------------------------+
|Filename: Clipboard01.jpg |
|Download: http://www.excelforum.com/attachment.php?postid=3569 |
+-------------------------------------------------------------------+

--
olasa
------------------------------------------------------------------------
olasa's Profile: http://www.excelforum.com/member.php...o&userid=17760
View this thread: http://www.excelforum.com/showthread...hreadid=384605



hagan

Gord,

That it!! Thanks for your help.

Hagan

"Gord Dibben" wrote:

Just highlight the visible rows and right-click on the status bar and select
"count".

Won't count rows hidden by filter.


Gord Dibben Excel MVP

On Tue, 5 Jul 2005 09:35:06 -0700, "hagan"
wrote:

After using a filter to view certain rows of a spreadsheet, is there a way to
get an accurate count of how many rows are shown by either clicking and
dragging the mouse over the selection or clicking on the first row and then
shift-click on the last row?

Thanks in advance,
Hagan





All times are GMT +1. The time now is 02:19 PM.

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