View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Ron McCormick Ron McCormick is offline
external usenet poster
 
Posts: 8
Default Programmed Autofilter Query

I'm wanting to run an autofilter with criteria selected from two different
fields.

Tow areas I need help with:

1 Is there a way of adding a workbook range to a ComboBox as the dropdown
list of items for selection rather than having to use ComboBox.Additem
methodology; and

2 Assuming we can do 1 I have listed the unique items from each field in two
ranges in the workbook and was hoping to use comboxes on a userform to select
the rows to be displayed. Trouble is when users are selecting the second
filter the whole selection of items from the second field are displayed, not
just those that meet the criteria from the first field.

Is there a way of making the second list dynamic so that it will only show
those items which correspond with the criterion selected from the first
field? For instance if field 1 has nation names: Spain, England, France
Germany and field 2 has football club names Barcelona, Real Madrid, Vila
Real, Chelsea, Liverpool, Arsenal, Manchester United, etc. In normal manual
"Autofilter" if England were selected for the field 1 criterion, then the
choice for field 2 would be limited to Chelsea, Liverpool, Arsenal,
Manchester United. Is there way of doing this via a userform?

Or does anyone know another way around this problem

TIA
Ron