PDA

View Full Version : VBA - Advanced filter with data Validation



Rubiks
05-17-2010, 11:26 AM
Hi there, new to the forum. Hopefully can receive some much needed assistance!

I am trying to do an advanced filter with a Data Validation List on a set of data. Have spent hours looking about online and found a VBA example close to what I would like (attached zip file). Having no VBA experience means I am having problems editing this.

I have attached a draft model of what I am hoping to achieve (Example Sheet .xls), Basically I have my Lists and raw data on the second tab and what I would like to do is adjust cells B2, E2 and H2 so that from A5:F20 will display the filtered data. Is this at all possible?

Alternatively could the zipped example be replicated with just the Date of Return Field and have the results sorted by Business area, and then by division? So if I looked up May 2010 I could see the absences sorted by Business Area, and then Division?

Any help would be immensely appreciated! Thanks in advance.

Rubiks
05-17-2010, 11:27 AM
Example spreadsheet.

Bob Phillips
05-18-2010, 12:22 AM
Why don't you just add AUtofilter to the headings?

rbrhodes
05-18-2010, 02:41 AM
Hi R

This does the 1 criteria jig. Copies data by date then sorts by BA, then Div. I added a copy/sort for 'All' as well as there was nothing in the example for 'All' just a blank spot.

It could do 3 criteria using VBA for sure perhaps even using the advanced filter but that's a lot more work, so consider this a free sample <grin>

Rubiks
05-18-2010, 11:32 AM
Thats great. Thanks alot! The autofilter feature is also very helpfuk. Thanks again to the both of you :clap: