Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 55
Default Code to unfilter one field only

Here is my code:

Sheets("CEU Database").Select

If Sheets("Code").Range("L2").Value = "All" Then
'??? I need to unfilter Field: 1 only, and leave all other filtered
fields intact
Else
Cells.Select
Selection.AutoFilter Field:=1,
Criteria1:=Sheets("Code").Range("L2").Value
End If


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Code to unfilter one field only

I put a little data on a worksheet.

I applied data|filter to that data. I filtered by both column 1 and column 2.
Then I turned on the macro recorder when I did "(All)" for the first field. I
got this back:

Selection.AutoFilter Field:=1



scrabtree23 wrote:

Here is my code:

Sheets("CEU Database").Select

If Sheets("Code").Range("L2").Value = "All" Then
'??? I need to unfilter Field: 1 only, and leave all other filtered
fields intact
Else
Cells.Select
Selection.AutoFilter Field:=1,
Criteria1:=Sheets("Code").Range("L2").Value
End If


--

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
VBA code for empty txt field AccessUser777 via OfficeKB.com Excel Discussion (Misc queries) 2 January 22nd 10 11:28 PM
unfilter peyman Excel Discussion (Misc queries) 2 October 26th 07 05:45 PM
Code to include a one-up suffix to a field value Doctorjones_md Excel Discussion (Misc queries) 4 January 4th 07 06:18 PM
Code to include a one-up suffix to a field value Doctorjones_md Excel Worksheet Functions 4 January 4th 07 06:18 PM
Unfilter JohnUK Excel Programming 2 June 18th 04 04:33 PM


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