LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 325
Default Function to display a count of visible cells/rows... doesn't

This is what happens when you take a couple of months away from VBA...

I'm trying to write a function to display the number of visible wows with a
range of cells.

Function CountVisibleRows(TheRange)
Dim CellToCount As Range
Dim RunningTotal As Long
RunningTotal = 0
For Each CellToCount In TheRange
If CellToCount.Row.Hidden = False Then
RunningTotal = RunningTotal + 1
End If
Next CellToCount
CountVisibleRows = RunningTotal
End Function

but I'm getting a message to say that .row is an invalid qualifier.
It's late in the day 9well, it is for me, anyway) and my brain has entered
the twilight zone.

Can anyone please help?

Thanks in advance

Pete
 
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 of visible, non-blank cells only? Alain Dekker[_2_] Excel Discussion (Misc queries) 8 September 23rd 09 02:40 PM
Count only visible cells Joe M. Excel Discussion (Misc queries) 4 July 26th 07 04:04 PM
count only visible cells bnkone Excel Worksheet Functions 2 March 31st 06 01:39 AM
count only the visible rows in a data table Eric[_27_] Excel Programming 11 August 22nd 05 01:12 AM
Autofilter - display column showing visible row count rgarber50 Excel Discussion (Misc queries) 5 July 26th 05 02:17 PM


All times are GMT +1. The time now is 07:09 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"