Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() I want to be able to control an autofilter from VBA. eg say I have a table with the following headings Animal Name Age In the animal column, the data is either Cat or Dog. How can I create a Macro to select Cat or Dog in the Auto Filter? Matt -- Mallycat ------------------------------------------------------------------------ Mallycat's Profile: http://www.excelforum.com/member.php...o&userid=35514 View this thread: http://www.excelforum.com/showthread...hreadid=552982 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Selection.Autofilter Filter:=1, Criteria1:="Cat"
-- Regards, Tom Ogilvy "Mallycat" wrote in message ... I want to be able to control an autofilter from VBA. eg say I have a table with the following headings Animal Name Age In the animal column, the data is either Cat or Dog. How can I create a Macro to select Cat or Dog in the Auto Filter? Matt -- Mallycat ------------------------------------------------------------------------ Mallycat's Profile: http://www.excelforum.com/member.php...o&userid=35514 View this thread: http://www.excelforum.com/showthread...hreadid=552982 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Tom Ogilvy Wrote: Selection.Autofilter Filter:=1, Criteria1:="Cat" Thanks. So easy when you know how. I haven't been able to get this to work previously. Matt -- Mallycat ------------------------------------------------------------------------ Mallycat's Profile: http://www.excelforum.com/member.php...o&userid=35514 View this thread: http://www.excelforum.com/showthread...hreadid=552982 |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
try using the macro recorder it will create the code you need
-- Cheers Nigel "Mallycat" wrote in message ... Tom Ogilvy Wrote: Selection.Autofilter Filter:=1, Criteria1:="Cat" Thanks. So easy when you know how. I haven't been able to get this to work previously. Matt -- Mallycat ------------------------------------------------------------------------ Mallycat's Profile: http://www.excelforum.com/member.php...o&userid=35514 View this thread: http://www.excelforum.com/showthread...hreadid=552982 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Excel auto-filter does not filter certain columns | Excel Discussion (Misc queries) | |||
DataFilterAuto Filter in excel 2007? | New Users to Excel | |||
Excel 2007 Auto Filter Filter | Excel Discussion (Misc queries) | |||
Limit filter options in Auto Filter | Excel Discussion (Misc queries) | |||
Excel auto filter doesn't recoginize case - won't filter AA from A | Excel Discussion (Misc queries) |