• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Sort list with VBA

David R

New Member
Hello all! This is my first post, so I apologise for any protocol errors I might make.
I have a listing of employees who are individually certified for certain courses but not others. I have them all on a master list, and I have some code that sorts the names to come up with a short list for any course I might select from a drop down box. Everything works fine, based on the original courses I had. Then I had to add a bunch more courses, but the sorting only works on the original courses. I assume something is wrong in the VBA parameters and hoping someone can help.
I am enclosing the complete worksheet. If there is a more efficient coding I could use to accomplish this, I am definitely open to that.
Thanks,
David R
 

Attachments

  • FilterList.xlsm
    87.6 KB · Views: 6
Welcome to the forum David.

It looks like in the worksheet, your table has not been extended to include the new columns you added. Need to redefine the range of the table, and then you should be good to go.
 
Thanks Luke. Can you tell me how to define that range? I know Excel has identified Table1 but I'm not sure how to change that.

David R
 
Actually, don't worry about it Luke. I figured out where to make the adjustments. Your help is much appreciated!

Thanks again,
David R
 
Hi David. I like your method of filtering a crosstab.

In the event that you wanted a non-VBA solution, another approach is to simply unpivot this data from a crosstab to a flat file , so that you can make a PivotTable out of it. THen you can achieve the same thing by filtering on the Course Name' column...either directly or by using a slicer.
 
Back
Top