Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 4
Default Separate Button for Auto Filter Selected Range

Hi,

How can we creat separate button in MS excel for selected range class in auto filter. If we click on button then only selected range class appears. Should we write script on Macro in VB.

For example,

Button Name "XYZ"

Column A (with Auto Filter)
ABC
XYZ
DEF
XYZ

If we click on button "XYZ" then cell "XYZ" instead of "ABC" & "DEF".

Regards

EggHeadCafe.com - .NET Developer Portal of Choice
http://www.eggheadcafe.com
  #2   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 10,124
Default Separate Button for Auto Filter Selected Range

IF? you mean that you want to filter the range by the selected column then
you would probably want a double_click event macro to do the autofilter

--
Don Guillett
SalesAid Software

<Nasir Naqvi wrote in message ...
Hi,

How can we creat separate button in MS excel for selected range class in
auto filter. If we click on button then only selected range class appears.
Should we write script on Macro in VB.

For example,

Button Name "XYZ"

Column A (with Auto Filter)
ABC
XYZ
DEF
XYZ

If we click on button "XYZ" then cell "XYZ" instead of "ABC" & "DEF".

Regards

EggHeadCafe.com - .NET Developer Portal of Choice
http://www.eggheadcafe.com


  #3   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 24
Default Separate Button for Auto Filter Selected Range

Create button using Control toolbox, right click on button and select
"view code", then enter the following

Private Sub ButtonXYZ_Click()
Columns("a:a").AutoFilter Field:=1, Criteria1:="XYZ",
visibledropdown:=False
End Sub

If you wanted to autofilter a specific range, you could replace
columns("a:a") with a range, such as range("a1:a5")
The visible drop-down is the autofilter arrow that appears in the first
cell in the range, it can be toggled on/off with true/false.

Regards,
Andrew J Armstrong

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
When in filter mode status bar doesn't show range of cells filted Marie McNamee Excel Worksheet Functions 1 November 20th 06 03:18 PM
lose selected range when I right click GCapo Excel Worksheet Functions 2 July 4th 06 10:24 PM
Advanced filter a dynamic date range oneandoneis2 Excel Worksheet Functions 2 April 6th 06 08:57 AM
Excel List range, filter arrows disappeared andrew Excel Discussion (Misc queries) 3 April 1st 05 11:30 PM
Macro to simply bring up the Find dialogue box?? marika1981 Excel Discussion (Misc queries) 14 January 14th 05 10:47 PM


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