Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,124
Default remove autofilter results with a macro

Here's one I did recently

Sub Togglefilteroutzero()
If ActiveSheet.AutoFilter Is Nothing Then
Range("b1").AutoFilter Field:=2, Criteria1:="<0"
Else
Range("b1").AutoFilter
End If
End Sub

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Don Guillett" wrote in message news:...
As ALWAYS, post your code for comments

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Muth69" wrote in message
...
I can't seem to find anything similar to this. I'm trying to setup a
macro
that will unfilter the sheet if the autofilter has been engaged. I can
get
it to work as long as at least 1 column has been autofiltered, but if
none
has been I get a run time error 1004. So then I tired a If then, but it
keeps hanging on part of the field. Thanks for your help.



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
remove autofilter results with a macro Muth69 Excel Programming 2 July 17th 09 09:59 PM
Autofilter results Ben Wunderin Excel Discussion (Misc queries) 3 December 2nd 08 12:31 AM
at excel start need macro to remove autofilter & apply sort mult t Nullentropy Excel Programming 1 September 19th 08 02:29 AM
Using autofilter results Cleber Inacio Excel Programming 1 November 18th 07 07:11 PM
Copy Autofilter results macro CLR Excel Programming 7 May 16th 05 06:48 PM


All times are GMT +1. The time now is 07:08 AM.

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"