Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default Selecting a call and using info in auto filter custom select

I have a table on left column is name of a server on the right are columns as
to their backup status the list of servers is about 100. I would like it if
an user could click on that cell and my doing so macr would sect the contents
and using that data to use on a custom filter on theraw data so they can view
the details of the of the backups related to that server

I have tried

Private Sub Worksheet_BeforeRightClick(ByVal Target As Range, Cancel As
Boolean)
Dim Selected
Set Selected = ActiveCell
Sheets("Raw Data").Select
Selection.AutoFilter Field:=1, Criteria1:=ActiveCell.Select, Operator:=xlAnd
End Sub

but it returns nothing can someone help?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Selecting a call and using info in auto filter custom select


Hi Jelinek,

The problem is with the following line:
Selection.AutoFilter Field:=1, Criteria1:=ActiveCell.Select
Operator:=xlAnd

it should work if changed to:
Selection.AutoFilter Field:=1, Criteria1:=ActiveCell.value

or even (based on the fact that the value is normally the defaul
property of the active cell):
Selection.AutoFilter Field:=1, Criteria1:=ActiveCell

I use a similar sort of macro at work to filter quickly, but rathe
than using a change macro I have assigned it to a shortcut key (coul
also be linked to a button on a toolbar), to prevent unintentiona
filtering when users are trying use the right click etc.

hth
Rob Brockett
NZ
Always learning & the best way to learn is to experience..

--
broro18
-----------------------------------------------------------------------
broro183's Profile: http://www.excelforum.com/member.php...fo&userid=3006
View this thread: http://www.excelforum.com/showthread.php?threadid=54325

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default Selecting a call and using info in auto filter custom select

thanks i will try this, just one thought? will this work if the filter is on
a diffrent worksheet?

Thanks

Simon

"broro183" wrote:


Hi Jelinek,

The problem is with the following line:
Selection.AutoFilter Field:=1, Criteria1:=ActiveCell.Select,
Operator:=xlAnd

it should work if changed to:
Selection.AutoFilter Field:=1, Criteria1:=ActiveCell.value

or even (based on the fact that the value is normally the default
property of the active cell):
Selection.AutoFilter Field:=1, Criteria1:=ActiveCell

I use a similar sort of macro at work to filter quickly, but rather
than using a change macro I have assigned it to a shortcut key (could
also be linked to a button on a toolbar), to prevent unintentional
filtering when users are trying use the right click etc.

hth
Rob Brockett
NZ
Always learning & the best way to learn is to experience...


--
broro183
------------------------------------------------------------------------
broro183's Profile: http://www.excelforum.com/member.php...o&userid=30068
View this thread: http://www.excelforum.com/showthread...hreadid=543250


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Selecting a call and using info in auto filter custom select


Hi Simon,

I'm guessing that you will have experimented with your macro by now,
but in case you are still after an answer...

The quick test that I've just done worked for me so I guess you can
filter other sheets, I was on sheet one & used:
Worksheets("sheet2").Range("a1").AutoFilter Field:=2, Criteria1:=
activecell

I think as long as your range includes a cell that is included in the
filtered range it should work - may be wrong though.


btw, if you are interested in a larger more generic filtering tool,
have a look at my homemade version:
http://excelforum.com/showthread.php?t=533724


hth
Rob Brockett
NZ
Always learning & the best way to learn is to experience...


--
broro183
------------------------------------------------------------------------
broro183's Profile: http://www.excelforum.com/member.php...o&userid=30068
View this thread: http://www.excelforum.com/showthread...hreadid=543250

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default Selecting a call and using info in auto filter custom select

Rob

thanks for all your help that worked a treat

Thanks

Simon

"broro183" wrote:


Hi Simon,

I'm guessing that you will have experimented with your macro by now,
but in case you are still after an answer...

The quick test that I've just done worked for me so I guess you can
filter other sheets, I was on sheet one & used:
Worksheets("sheet2").Range("a1").AutoFilter Field:=2, Criteria1:=
activecell

I think as long as your range includes a cell that is included in the
filtered range it should work - may be wrong though.


btw, if you are interested in a larger more generic filtering tool,
have a look at my homemade version:
http://excelforum.com/showthread.php?t=533724


hth
Rob Brockett
NZ
Always learning & the best way to learn is to experience...


--
broro183
------------------------------------------------------------------------
broro183's Profile: http://www.excelforum.com/member.php...o&userid=30068
View this thread: http://www.excelforum.com/showthread...hreadid=543250




  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Selecting a call and using info in auto filter custom select


Hi Simon,
No problem - pleased I could help :-)

Rob Brockett
NZ
Always learning & the best way to learn is to experience..

--
broro18
-----------------------------------------------------------------------
broro183's Profile: http://www.excelforum.com/member.php...fo&userid=3006
View this thread: http://www.excelforum.com/showthread.php?threadid=54325

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
Auto filter custom filter stevefromnaki Excel Worksheet Functions 2 December 30th 09 06:23 AM
Custom Auto Filter Dave Excel Discussion (Misc queries) 1 October 1st 09 02:19 PM
Select All Auto Filter Milodie66 Excel Discussion (Misc queries) 0 March 18th 09 03:57 PM
Filter, Select, or Remove Info from Chart tommcbrny Charts and Charting in Excel 2 February 24th 09 08:15 PM
selecting from dropdown--have related info auto carry over Susan Excel Worksheet Functions 2 August 17th 07 02:07 PM


All times are GMT +1. The time now is 04:26 PM.

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"