Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 29
Default Invoking autofilter 'automatically'

I have two datasheets, one with three different headings, e.g. A

B

C

The other datasheet has a number of different entries, but with one of the
headings next to them, e.g. Egg A
Apple A
Custard B
Milk C


If I select 'A' on the first datasheet, I want the second one to display
only the values relevant entries to 'A'.

Autofilter will obviously do a great job of splitting my entries into 3
types, but how can I invoke autofilter automatically based on the heading I
choose from the first datasheet?

Any advice gratefully received.


  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,646
Default Invoking autofilter 'automatically'

One solution to run this macro:

Sub test()
Worksheets("Sheet1").Select
currentcell = ActiveCell.Address(False, False)
Worksheets("Sheet2").Select
Selection.AutoFilter Field:=2,
Criteria1:=Worksheets("Sheet1").Range(currentcell) , Operator:=xlAnd
End Sub

Regards,
Stefi


€˛Kierano€¯ ezt Ć*rta:

I have two datasheets, one with three different headings, e.g. A

B

C

The other datasheet has a number of different entries, but with one of the
headings next to them, e.g. Egg A
Apple A
Custard B
Milk C


If I select 'A' on the first datasheet, I want the second one to display
only the values relevant entries to 'A'.

Autofilter will obviously do a great job of splitting my entries into 3
types, but how can I invoke autofilter automatically based on the heading I
choose from the first datasheet?

Any advice gratefully received.


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 29
Default Invoking autofilter 'automatically'

Thanks, but I'm afraid this didn't work, since complile error:syntax error is
occurring.



"Stefi" wrote:

One solution to run this macro:

Sub test()
Worksheets("Sheet1").Select
currentcell = ActiveCell.Address(False, False)
Worksheets("Sheet2").Select
Selection.AutoFilter Field:=2,
Criteria1:=Worksheets("Sheet1").Range(currentcell) , Operator:=xlAnd
End Sub

Regards,
Stefi


€˛Kierano€¯ ezt Ć*rta:

I have two datasheets, one with three different headings, e.g. A

B

C

The other datasheet has a number of different entries, but with one of the
headings next to them, e.g. Egg A
Apple A
Custard B
Milk C


If I select 'A' on the first datasheet, I want the second one to display
only the values relevant entries to 'A'.

Autofilter will obviously do a great job of splitting my entries into 3
types, but how can I invoke autofilter automatically based on the heading I
choose from the first datasheet?

Any advice gratefully received.


  #4   Report Post  
Posted to microsoft.public.excel.misc
ICE ICE is offline
external usenet poster
 
Posts: 25
Default Invoking autofilter 'automatically'

Try this one...

Range("A1").Select
Sheets("Sheet1").Select
Selection.AutoFilter Field:=2, Criteria1:="a"
ActiveWindow.SmallScroll Down:=-9
End Sub

"Kierano" wrote:

Thanks, but I'm afraid this didn't work, since complile error:syntax error is
occurring.



"Stefi" wrote:

One solution to run this macro:

Sub test()
Worksheets("Sheet1").Select
currentcell = ActiveCell.Address(False, False)
Worksheets("Sheet2").Select
Selection.AutoFilter Field:=2,
Criteria1:=Worksheets("Sheet1").Range(currentcell) , Operator:=xlAnd
End Sub

Regards,
Stefi


€˛Kierano€¯ ezt Ć*rta:

I have two datasheets, one with three different headings, e.g. A

B

C

The other datasheet has a number of different entries, but with one of the
headings next to them, e.g. Egg A
Apple A
Custard B
Milk C


If I select 'A' on the first datasheet, I want the second one to display
only the values relevant entries to 'A'.

Autofilter will obviously do a great job of splitting my entries into 3
types, but how can I invoke autofilter automatically based on the heading I
choose from the first datasheet?

Any advice gratefully received.


  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 29
Default Invoking autofilter 'automatically'

Great. Works fine!

Have used forms to assign macros to buttons and edited to appropriate names.

Thanks and have a good day.

Only

"ice" wrote:

Try this one...

Range("A1").Select
Sheets("Sheet1").Select
Selection.AutoFilter Field:=2, Criteria1:="a"
ActiveWindow.SmallScroll Down:=-9
End Sub

"Kierano" wrote:

Thanks, but I'm afraid this didn't work, since complile error:syntax error is
occurring.



"Stefi" wrote:

One solution to run this macro:

Sub test()
Worksheets("Sheet1").Select
currentcell = ActiveCell.Address(False, False)
Worksheets("Sheet2").Select
Selection.AutoFilter Field:=2,
Criteria1:=Worksheets("Sheet1").Range(currentcell) , Operator:=xlAnd
End Sub

Regards,
Stefi


€˛Kierano€¯ ezt Ć*rta:

I have two datasheets, one with three different headings, e.g. A

B

C

The other datasheet has a number of different entries, but with one of the
headings next to them, e.g. Egg A
Apple A
Custard B
Milk C


If I select 'A' on the first datasheet, I want the second one to display
only the values relevant entries to 'A'.

Autofilter will obviously do a great job of splitting my entries into 3
types, but how can I invoke autofilter automatically based on the heading I
choose from the first datasheet?

Any advice gratefully received.




  #6   Report Post  
Posted to microsoft.public.excel.misc
ICE ICE is offline
external usenet poster
 
Posts: 25
Default Invoking autofilter 'automatically'

Glad I helped!!
Just rate the post in order to stop others from ansewring too.

have a nice day!!!:-)

"Kierano" wrote:

Great. Works fine!

Have used forms to assign macros to buttons and edited to appropriate names.

Thanks and have a good day.

Only

"ice" wrote:

Try this one...

Range("A1").Select
Sheets("Sheet1").Select
Selection.AutoFilter Field:=2, Criteria1:="a"
ActiveWindow.SmallScroll Down:=-9
End Sub

"Kierano" wrote:

Thanks, but I'm afraid this didn't work, since complile error:syntax error is
occurring.



"Stefi" wrote:

One solution to run this macro:

Sub test()
Worksheets("Sheet1").Select
currentcell = ActiveCell.Address(False, False)
Worksheets("Sheet2").Select
Selection.AutoFilter Field:=2,
Criteria1:=Worksheets("Sheet1").Range(currentcell) , Operator:=xlAnd
End Sub

Regards,
Stefi


€˛Kierano€¯ ezt Ć*rta:

I have two datasheets, one with three different headings, e.g. A

B

C

The other datasheet has a number of different entries, but with one of the
headings next to them, e.g. Egg A
Apple A
Custard B
Milk C


If I select 'A' on the first datasheet, I want the second one to display
only the values relevant entries to 'A'.

Autofilter will obviously do a great job of splitting my entries into 3
types, but how can I invoke autofilter automatically based on the heading I
choose from the first datasheet?

Any advice gratefully received.


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
Copy Rows to another Sheet Automatically Tim & Holly Excel Worksheet Functions 2 March 7th 06 12:53 PM
Custom autofilter Bug In excel 2002 Matthew D Excel Discussion (Misc queries) 0 February 14th 06 02:54 AM
Automatically update cells Maddoktor Excel Discussion (Misc queries) 1 December 8th 05 12:56 AM
Excel file automatically opens - More Info Lost4Now Excel Discussion (Misc queries) 2 December 4th 05 11:01 PM
AutoFilter (Temporary Solution) FrankTimJr Excel Worksheet Functions 0 November 29th 05 08:10 PM


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