Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 23
Default Count number of rows, where non relevant rows are hidden

I want to count the number of rows i a worksheet. I have hidden the non
relevant rows in the sheet.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,058
Default Count number of rows, where non relevant rows are hidden

Enter and run this small sub:

Sub IAmTheCount()
Dim r As Range, c1 As Long, c2 As Long

For Each r In ActiveSheet.UsedRange.Rows
If r.Hidden Then
c1 = c1 + 1
Else
c2 = c2 + 1
End If
Next
MsgBox (c1 & " rows are hidden")
MsgBox (c2 & " rows are not hidden")
End Sub


It will report the number of hidden and un-hidden rows in your used range.
--
Gary's Student


"Pieter" wrote:

I want to count the number of rows i a worksheet. I have hidden the non
relevant rows in the sheet.

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10,593
Default Count number of rows, where non relevant rows are hidden

Use SUBTOTAL(2,rng)

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Pieter" wrote in message
...
I want to count the number of rows i a worksheet. I have hidden the non
relevant rows in the sheet.



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 each cell that have a number and take that number and count. Vick Excel Discussion (Misc queries) 3 May 19th 06 01:51 AM
Count Number of Characters in a cell? AHJuncti Excel Discussion (Misc queries) 2 June 16th 05 07:39 PM
Clean does not remove hidden formatting on a number MickF Excel Worksheet Functions 2 May 19th 05 07:18 PM
Insert rows Mr. G. Excel Worksheet Functions 3 March 31st 05 03:49 AM
Count number of row where are data Maileen Excel Discussion (Misc queries) 3 December 28th 04 10:53 AM


All times are GMT +1. The time now is 12:55 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"