![]() ![]() Private Sub Worksheet_Change( ByVal Target As Range) You can substitute the name of your workbook, worksheet, and column to reflect whatever range you are working with. The macro sorts the data range in ascending order, and that carries over to the drop down list that is being fed by the source range. Sorting Drop Down Lists with a VBA MacroĪpplies to: All desktop versions of Excel for Windows and Mac.īelow is VBA code for a macro that runs automatically any time a change is made to the worksheet that contains the source data for your drop-down list. In this post I explain four different solutions, and you should be able to use at least one of these regardless of which version of Excel you are using. And while I mention a macro as the solution in my response to the question, there are actually a variety of ways to accomplish this. ![]() The answer to the question is: absolutely. Suliman, Wim, and Colin wanted to know if it is possible to automatically sort the drop-downs whenever new entries are added to the source range. We received a great question in the comments of my previous YouTube video on How to Add New Items to a Drop-down List Automatically. Automatically-Sort-Data-Validation-List.zip Download 4 Ways to Sort Drop Down Lists ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
June 2023
Categories |