{"id":2737,"date":"2015-05-14T14:57:49","date_gmt":"2015-05-14T14:57:49","guid":{"rendered":"http:\/\/www.microsofttraining.net\/b\/?p=2737"},"modified":"2023-12-31T00:06:40","modified_gmt":"2023-12-31T00:06:40","slug":"create-dynamic-drop-down-lists-in-excel","status":"publish","type":"post","link":"https:\/\/www.stl-training.co.uk\/b\/create-dynamic-drop-down-lists-in-excel\/","title":{"rendered":"Create Dynamic Drop Down lists in Excel"},"content":{"rendered":"<h2>Quickly create drop down lists in Excel with automatic sorting<\/h2>\n<p>The Drop Down list in <a href=\"\/microsoft\/excel-training-london.php#resources\">Excel<\/a> is a great automation tool. You can turn any data list into a <a title=\"Create a drop-down list in Excel\" href=\"https:\/\/www.stl-training.co.uk\/b\/blog\/excel-training\/create-drop-list-excel\/\">drop down list<\/a> which makes it easier to place items in cells. Drop down lists show the data in the same order in which they appear in the original list.<\/p>\n<p>This may be a problem if you want your drop down list to be in alphabetical order while your original data should not be sorted. If the drop down list is long, it will take forever to find items if they are not sorted. Also, many data sets are dynamic (new records are added all the time). In this case, you need to keep altering the list range in your Data Validation which manages the list.<\/p>\n<p>In this tutorial, you will learn\u00a0how to create drop down lists which expand dynamically and sort alphabetically by default.<\/p>\n<p>A normal drop down list looks like this:<\/p>\n<p><a href=\"https:\/\/www.stl-training.co.uk\/b\/wp-content\/uploads\/2015\/05\/List-1.png\"><img decoding=\"async\" class=\"alignnone size-full wp-image-2738\" src=\"https:\/\/www.stl-training.co.uk\/b\/wp-content\/uploads\/2015\/05\/List-1.png\" alt=\"List 1\" width=\"821\" height=\"626\" \/><\/a><\/p>\n<p>To make the data list and the drop down dynamic as well as making the drop down alphabetical, follow these steps:<\/p>\n<p><strong>Step 1.<\/strong> Select the original list and give it a dynamic range name (which automatically includes new entries). See below.<\/p>\n<p><a href=\"https:\/\/www.stl-training.co.uk\/b\/wp-content\/uploads\/2015\/05\/DNR.jpg\"><img decoding=\"async\" class=\"alignnone size-full wp-image-2739\" src=\"https:\/\/www.stl-training.co.uk\/b\/wp-content\/uploads\/2015\/05\/DNR.jpg\" alt=\"DNR\" width=\"757\" height=\"527\" \/><\/a><\/p>\n<p>Example of formula in &#8216;Refers to&#8217; field:<\/p>\n<p><strong>=OFFSET(Sheet1!$A$1, 0, 0, COUNTA(Sheet1!$A$1:$A$1000))<\/strong><\/p>\n<p>When you type the Offset formula into the &#8216;Refers to&#8217; field, make sure the cell references reflect the position and size of your list, e.g. $A$1:$A$2000 if you have 1000+ records. You can make this any number of rows.<\/p>\n<p><strong>Step 2.<\/strong> The next step is to open a new or existing empty sheet where you can enter a formula which will create a copy of the original list, but sorted alphabetically. You must enter the formula manually and then press Ctrl + Shift + Enter to make it work. if you only press Enter, it will give an error. Here is an example of the formula:<\/p>\n<p><strong>=IF(COUNTA(List)&gt;=ROWS($A$1:A1), INDEX(List, MATCH(SMALL(COUNTIF(List, &#8220;&lt;&#8220;&amp;List), ROW(A1)), COUNTIF(List, &#8220;&lt;&#8220;&amp;List), 0)), &#8220;&#8221;)<\/strong><\/p>\n<p>&#8216;List&#8217; in the formula represents the range name you gave your original list earlier.<\/p>\n<p>Once you have typed the formula and pressed Ctrl + Shift + Enter, copy this formula down until it shows an empty cell. This means all the records of the original list are in this list.<\/p>\n<p><a href=\"https:\/\/www.stl-training.co.uk\/b\/wp-content\/uploads\/2015\/05\/LONG.png\"><img decoding=\"async\" class=\"alignnone size-full wp-image-2740\" src=\"https:\/\/www.stl-training.co.uk\/b\/wp-content\/uploads\/2015\/05\/LONG.png\" alt=\"LONG\" width=\"1370\" height=\"308\" \/><\/a><\/p>\n<p>After copying this formula down, your alphabetised list will show. Next, highlight this list and give it a range name.<\/p>\n<p><a href=\"https:\/\/www.stl-training.co.uk\/b\/wp-content\/uploads\/2015\/05\/Newname.jpg\"><img decoding=\"async\" class=\"alignnone size-full wp-image-2741\" src=\"https:\/\/www.stl-training.co.uk\/b\/wp-content\/uploads\/2015\/05\/Newname.jpg\" alt=\"Newname\" width=\"722\" height=\"556\" \/><\/a><\/p>\n<p>The last step is to create the drop down list using the range name as the source.<\/p>\n<p><a href=\"https:\/\/www.stl-training.co.uk\/b\/wp-content\/uploads\/2015\/05\/ddl.jpg\"><img decoding=\"async\" class=\"alignnone wp-image-2742 size-full\" src=\"https:\/\/www.stl-training.co.uk\/b\/wp-content\/uploads\/2015\/05\/ddl.jpg\" alt=\"Dynamic Drop Down lists\" width=\"679\" height=\"540\" \/><\/a><\/p>\n<p>You have just created a drop down list which will dynamically\u00a0update\u00a0with the original list, and which will always be in alphabetical order!<\/p>\n<p><a href=\"https:\/\/www.stl-training.co.uk\/b\/wp-content\/uploads\/2015\/05\/final.png\"><img decoding=\"async\" class=\"alignnone size-full wp-image-2743\" src=\"https:\/\/www.stl-training.co.uk\/b\/wp-content\/uploads\/2015\/05\/final.png\" alt=\"final\" width=\"769\" height=\"588\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<h3>Additional Resources<\/h3>\n<p><a title=\"Create a drop-down list in Excel\" href=\"https:\/\/www.stl-training.co.uk\/b\/blog\/excel-training\/create-drop-list-excel\/\">Create a drop-down list in Excel<\/a><\/p>\n<p><a href=\"http:\/\/chandoo.org\/wp\/2014\/02\/13\/dynamic-cascading-dropdowns-that-reset\/\">Dynamic (Cascading) Dropdowns that reset on change<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Quickly create drop down lists in Excel with automatic sorting The Drop Down list in Excel is a great automation tool. You can turn any data list into a drop down list which makes it easier to place items in cells. Drop down lists show the data in the same order in which they appear [&hellip;]<\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[4,6],"tags":[126,161],"class_list":["post-2737","post","type-post","status-publish","format-standard","hentry","category-excel-training","category-hints-tips","tag-create-a-drop-down-list","tag-drop-down-lists-excel"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.stl-training.co.uk\/b\/wp-json\/wp\/v2\/posts\/2737","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.stl-training.co.uk\/b\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.stl-training.co.uk\/b\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.stl-training.co.uk\/b\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/www.stl-training.co.uk\/b\/wp-json\/wp\/v2\/comments?post=2737"}],"version-history":[{"count":1,"href":"https:\/\/www.stl-training.co.uk\/b\/wp-json\/wp\/v2\/posts\/2737\/revisions"}],"predecessor-version":[{"id":6283,"href":"https:\/\/www.stl-training.co.uk\/b\/wp-json\/wp\/v2\/posts\/2737\/revisions\/6283"}],"wp:attachment":[{"href":"https:\/\/www.stl-training.co.uk\/b\/wp-json\/wp\/v2\/media?parent=2737"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.stl-training.co.uk\/b\/wp-json\/wp\/v2\/categories?post=2737"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.stl-training.co.uk\/b\/wp-json\/wp\/v2\/tags?post=2737"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}