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: 1,090
Default Filter and count hidden cells problem

Excel XP & Win XP
I have headers in row 2.
I have data in row 3 only, therefore, RngToCopy is B3. This is correct.
I invoke an Auto-Filter on the data and, as a result, there are NO visible
rows (below the header row).
I have the following 2 message boxes:
MsgBox RngToCopy.Address(0, 0)
MsgBox RngToCopy.SpecialCells(xlCellTypeVisible).Count
The first MsgBox gives B3. Correct.
The second MsgBox gives 16776960 which is very close to the number of cells
in the sheet!!.
Since B3 is the RngToCopy and B3 is hidden (by filter), I expected the
second MsgBox to give a zero.
How can I get the count of visible cells in a range if all the cells in the
range are hidden?
Or, to put it another way, how can I determine that no rows satisfied the
filter criteria?
Thanks for your time. Otto


 
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
Auto filter hidden cells Chiccada Excel Discussion (Misc queries) 1 February 19th 10 10:58 AM
Do not count hidden cells mac Excel Discussion (Misc queries) 2 August 28th 07 10:20 AM
Is it possible to not count hidden cells? Jimbob Excel Discussion (Misc queries) 5 July 31st 07 01:05 AM
Filling both hidden and visible cells once a filter has been applied Corrie Excel Programming 0 December 28th 06 05:20 PM
Count with Hidden cells Stretch Excel Discussion (Misc queries) 5 July 9th 05 11:55 PM


All times are GMT +1. The time now is 10:39 AM.

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"