Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.charting
external usenet poster
 
Posts: 14
Default how to set a button to filter a table

I have a spreadsheet with 2 tabs. "Instr" and "BF_List". On the
Instr tab, I have a table to generate the 12 months of the year with
from and to dates based on cell T69. This way I can have dates for
years 2009 to 2020. The table has the dates in cells T71 (ie. Jan. 1,
2009) and cell U71 has Jan. 31, 2009. Down the table to Dec.

Now on the tab BF list, starting on row 4 I have effective date, name
and other details up to column F. This list could have assorted
dates from Jan. 1, 2009 to Dec. 31, 2009. I want to be able to give
the users an easy option to sort by month. So, I had thought adding a
button for each month. ie. sort Jan. sort Feb. and so on.

My problem is the code for the macro to sort. I need to be able to
pull from the first tab on the Instr. sheet the from and to dates so
that I can filter the list. I have chosen 'equal to or greater than"
and cell T71 for Jan. 1, 2009 and then then end date of 'less than or
equal to" cell U71.

I would change cells for each month.

I have not found a way to get the macro code to select from the table
on the other tab.

The table I want to sort has a header row A3 to F3 and the data is
from A4 to F4 down to row 4000.

this is what I have so far.

Range("A4").Select
Selection.AutoFilter
Selection.AutoFilter Field:=1, Criteria1:="=01-Jan-2009",
Operator:= _
xlAnd, Criteria2:="<=31-jan-2009"
End Sub


thanks for any help or options.

Mel
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
Second small arrow on filter button EllenOJD Excel Discussion (Misc queries) 2 April 4th 23 11:38 AM
Filter - Show All button Francesco Excel Discussion (Misc queries) 1 August 13th 08 07:00 PM
auto filter use with command button deen Excel Worksheet Functions 9 April 22nd 08 10:55 PM
Auto filter through the Comman Button irsath Excel Worksheet Functions 2 July 3rd 06 01:04 PM
Filter (do not want the ugly drop-down button) HT New Users to Excel 3 March 31st 05 01:11 AM


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