Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default Code to determine if data is filtered

What code could I use to show all rows in the data filtering, IF data
filtering is on. I tried,
ActiveSheet.ShowAllData

but then it bombs if nothing is already filtered.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 772
Default Code to determine if data is filtered

Several ways to check for filter, but to take yours to the next level
On Error Resume Next
ActiveSheet.ShowAllData
--
-John
Please rate when your question is answered to help us and others know what
is helpful.


" wrote:

What code could I use to show all rows in the data filtering, IF data
filtering is on. I tried,
ActiveSheet.ShowAllData

but then it bombs if nothing is already filtered.


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Code to determine if data is filtered

With activesheet
If .FilterMode Then
.ShowAllData
End If
end with

or just ignore the error:

on error resume next
ActiveSheet.ShowAllData
on error goto 0



" wrote:

What code could I use to show all rows in the data filtering, IF data
filtering is on. I tried,
ActiveSheet.ShowAllData

but then it bombs if nothing is already filtered.


--

Dave Peterson
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
Return filtered values into report worksheet based on filtered valueon the data worksheet dicko1 Excel Worksheet Functions 1 April 21st 09 12:27 AM
Code to unfilter if filtered Shawn Excel Programming 1 February 1st 07 03:25 PM
Formula to determine row of hi value filtered column rgarber50 Excel Discussion (Misc queries) 0 September 4th 05 10:27 PM
Determine Frequency in Filtered List Michael Excel Worksheet Functions 3 February 10th 05 07:57 PM


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