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: 430
Default Question RE Count of records in AutoFilter

Why is it that I'm having to use the separate Else statement "Count -2" when
my
I'm back to selecting "All" from my Auto-Filter range?

Private Sub CommandButton1_Click()
If FilterMode = True Then
MsgBox ActiveSheet.AutoFilter.Range.Columns(1) _
.Cells.SpecialCells(xlCellTypeVisible).Count - 1
Else: MsgBox ActiveSheet.AutoFilter.Range.Columns(1) _
.Cells.SpecialCells(xlCellTypeVisible).Count - 2
End If
End Sub



 
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
How do I count the number of records autofilter is showing in Exce Patricia O''Donnell SSJ Excel Worksheet Functions 3 November 1st 09 09:17 PM
Unique Records Count with AutoFilter Danni2004 Excel Worksheet Functions 1 May 16th 08 09:56 PM
How to obtain the number of filtered records in Autofilter Ramez Excel Worksheet Functions 2 August 24th 06 11:00 PM
Autofilter number of records Ginger Excel Worksheet Functions 3 September 28th 05 03:23 PM
Selecting Filtered records only when AutoFilter is on Owen Vickers Excel Programming 4 February 21st 04 02:20 AM


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