Filter on Multiple criteria

tommycahir

New Member
Joined
Apr 24, 2005
Messages
17
Hi

I have a worksheet that i want to be able to filter by country and also between dates . i have the VBA code and macro working ok for filtering between 2 inputted dates for the sheet but now i hit the obtacle of what is the best way of getting to filter based on country where there is the possibility of filtering on multiple countries.

I have looked at the listbox component but am not sure how to use this to be able to filter on multiple selected countries or how to pass the values from this to a filter command or how to populate this component

Any help in regards this would be great

Regards
Tommy
 
To be honest

I dont have any code apart form the earlier piece that filters between 2 dates

i need to start from scratch about the list box :(
 
Upvote 0
Ok I think i can populate the list box using the following code

Code:
With Sheet1
        ListBox1.List = Application.Transpose(.Range(.Range(\"A2\"), .Range(\"A2\").End(xlDown)).Value)
    End With

but then after the user has select the possible countries affected eg CH,ES,IT and they press the button on the sheet how do i read\determine what countries are selected so that i can create a custom filter on those countries only?
 
Upvote 0

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top