{"id":6496,"date":"2023-06-22T09:17:16","date_gmt":"2023-06-22T09:17:16","guid":{"rendered":"https:\/\/www.stl-training.co.uk\/b\/?p=6496"},"modified":"2023-12-30T22:30:05","modified_gmt":"2023-12-30T22:30:05","slug":"be-more-productive-with-excels-sort-function-2-of-2","status":"publish","type":"post","link":"https:\/\/www.stl-training.co.uk\/b\/be-more-productive-with-excels-sort-function-2-of-2\/","title":{"rendered":"Be More Productive With Excel\u2019s SORT function (2 of 4)"},"content":{"rendered":"<p>This blog is part 2 of a series that looks at the amazing functionality of some of the most popular Office 365 <a href=\"https:\/\/www.stl-training.co.uk\/microsoft\/excel-intermediate-courses.php\">Excel functions<\/a>. In part 1 the focus was on the FILTER function. Building on this, we will explore how useful the SORT function is in arranging data more efficiently.<\/p>\n<p><img decoding=\"async\" class=\"alignnone wp-image-6502 size-full\" title=\"sort\" src=\"https:\/\/www.stl-training.co.uk\/b\/wp-content\/uploads\/2023\/06\/Sort-Function-capital.jpg\" alt=\"sort\" width=\"1200\" height=\"800\" srcset=\"https:\/\/www.stl-training.co.uk\/b\/wp-content\/uploads\/2023\/06\/Sort-Function-capital.jpg 1200w, https:\/\/www.stl-training.co.uk\/b\/wp-content\/uploads\/2023\/06\/Sort-Function-capital-300x200.jpg 300w, https:\/\/www.stl-training.co.uk\/b\/wp-content\/uploads\/2023\/06\/Sort-Function-capital-1024x683.jpg 1024w, https:\/\/www.stl-training.co.uk\/b\/wp-content\/uploads\/2023\/06\/Sort-Function-capital-768x512.jpg 768w\" sizes=\"(max-width: 1200px) 100vw, 1200px\" \/><\/p>\n<h2><strong>What is the SORT function<\/strong><\/h2>\n<p>The SORT function is based on the standard way of sorting in Excel. It works by extracting the sorted rows from the source data and populating these rows to another sheet. As the sorting process does not affect the source data, the sorted data can be re-sorted without having to return to the original dataset. Thereby increasing your efficiency.<\/p>\n<h2><strong>How is the SORT function different from other functions?<\/strong><\/h2>\n<p>The <a href=\"https:\/\/support.microsoft.com\/en-au\/office\/sort-function-22f63bd0-ccc8-492f-953d-c20e8e44b86c\">SORT<\/a> function is one of a number of Office 365 functions that behaves differently to all other Excel functions. With the SORT function, the results automatically \u2018spill\u2019 into all available cells below. In contrast, all other functions require you to copy the result down manually.<\/p>\n<h2><strong>How to apply the SORT function<\/strong><\/h2>\n<p>Let\u2019s take some financial data where all records relating to \u2018London\u2019 need to be sorted (see below)<\/p>\n<p><img decoding=\"async\" class=\"alignnone wp-image-6497 size-full\" title=\"sort\" src=\"https:\/\/www.stl-training.co.uk\/b\/wp-content\/uploads\/2023\/06\/Sort-Function-1.png\" alt=\"filter\" width=\"473\" height=\"537\" srcset=\"https:\/\/www.stl-training.co.uk\/b\/wp-content\/uploads\/2023\/06\/Sort-Function-1.png 473w, https:\/\/www.stl-training.co.uk\/b\/wp-content\/uploads\/2023\/06\/Sort-Function-1-264x300.png 264w\" sizes=\"(max-width: 473px) 100vw, 473px\" \/><\/p>\n<ol>\n<li>Copy the source data headings into another sheet and select the cell below the first heading \u2013 see below:<\/li>\n<\/ol>\n<p><img decoding=\"async\" class=\"alignnone wp-image-6498 size-full\" title=\"sort\" src=\"https:\/\/www.stl-training.co.uk\/b\/wp-content\/uploads\/2023\/06\/Sort-Function-2.png\" alt=\"sort\" width=\"644\" height=\"122\" srcset=\"https:\/\/www.stl-training.co.uk\/b\/wp-content\/uploads\/2023\/06\/Sort-Function-2.png 644w, https:\/\/www.stl-training.co.uk\/b\/wp-content\/uploads\/2023\/06\/Sort-Function-2-300x57.png 300w\" sizes=\"(max-width: 644px) 100vw, 644px\" \/><\/p>\n<p><img decoding=\"async\" class=\"alignnone wp-image-6499 size-full\" title=\"sort\" src=\"https:\/\/www.stl-training.co.uk\/b\/wp-content\/uploads\/2023\/06\/Sort-Function-3.png\" alt=\"sort\" width=\"660\" height=\"153\" srcset=\"https:\/\/www.stl-training.co.uk\/b\/wp-content\/uploads\/2023\/06\/Sort-Function-3.png 660w, https:\/\/www.stl-training.co.uk\/b\/wp-content\/uploads\/2023\/06\/Sort-Function-3-300x70.png 300w\" sizes=\"(max-width: 660px) 100vw, 660px\" \/><\/p>\n<ul>\n<li>The 1<sup>st<\/sup> part is the \u2018ARRAY\u2019 or range of source data for selection<\/li>\n<li>The 2<sup>nd<\/sup> part is the SORT INDEX which is a number assigned to the position of the field to be sorted from the left (e.g. 3 for \u2018BudgetDepartment\u2019)<\/li>\n<li>The 3<sup>rd<\/sup> part is the SORT ORDER which is 1 for ascending or -1 for descending<\/li>\n<\/ul>\n<p>The following data is now sorted by BudgetDepartment:<\/p>\n<p><img decoding=\"async\" class=\"alignnone wp-image-6500 size-full\" title=\"sort\" src=\"https:\/\/www.stl-training.co.uk\/b\/wp-content\/uploads\/2023\/06\/Sort-Function-4.png\" alt=\"filter\" width=\"439\" height=\"537\" srcset=\"https:\/\/www.stl-training.co.uk\/b\/wp-content\/uploads\/2023\/06\/Sort-Function-4.png 439w, https:\/\/www.stl-training.co.uk\/b\/wp-content\/uploads\/2023\/06\/Sort-Function-4-245x300.png 245w\" sizes=\"(max-width: 439px) 100vw, 439px\" \/><\/p>\n<p>Sometimes the date field will return dates as an unformatted number e.g. 43160. If this happens, simply reformat the date column back to \u2018date\u2019 (use Ctrl 1 to quickly reset the date formatting)<\/p>\n<p>Another problem that could arise is if there are not enough free rows to populate the results. If any data is \u2018blocking\u2019 this space, then you will get a #SPILL error:<\/p>\n<p><img decoding=\"async\" class=\"alignnone wp-image-6501 size-full\" src=\"https:\/\/www.stl-training.co.uk\/b\/wp-content\/uploads\/2023\/06\/Sort-Function-5.png\" alt=\"\" width=\"624\" height=\"233\" srcset=\"https:\/\/www.stl-training.co.uk\/b\/wp-content\/uploads\/2023\/06\/Sort-Function-5.png 624w, https:\/\/www.stl-training.co.uk\/b\/wp-content\/uploads\/2023\/06\/Sort-Function-5-300x112.png 300w\" sizes=\"(max-width: 624px) 100vw, 624px\" \/><\/p>\n<p>To remove the spill error, simply delete the data that is blocking the spill. Other Office 365 functions such as UNIQUE and FILTER also have this \u2018spill\u2019 feature.<\/p>\n<h2><strong>Conclusion<\/strong><\/h2>\n<p>The Excel SORT function is an amazing tool that allows you to sort data whilst leaving the original source data untouched. Consequently, the SORT function can help improve your efficiency and productivity when you need to refer back to your unsorted lists.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This blog is part 2 of a series that looks at the amazing functionality of some of the most popular Office 365 Excel functions. In part 1 the focus was on the FILTER function. Building on this, we will explore how useful the SORT function is in arranging data more efficiently. What is the SORT [&hellip;]<\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[637,4,9],"tags":[67],"class_list":["post-6496","post","type-post","status-publish","format-standard","hentry","category-application","category-excel-training","category-microsoft-office","tag-autofilter-and-sort-in-excel"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.stl-training.co.uk\/b\/wp-json\/wp\/v2\/posts\/6496","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=6496"}],"version-history":[{"count":2,"href":"https:\/\/www.stl-training.co.uk\/b\/wp-json\/wp\/v2\/posts\/6496\/revisions"}],"predecessor-version":[{"id":6528,"href":"https:\/\/www.stl-training.co.uk\/b\/wp-json\/wp\/v2\/posts\/6496\/revisions\/6528"}],"wp:attachment":[{"href":"https:\/\/www.stl-training.co.uk\/b\/wp-json\/wp\/v2\/media?parent=6496"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.stl-training.co.uk\/b\/wp-json\/wp\/v2\/categories?post=6496"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.stl-training.co.uk\/b\/wp-json\/wp\/v2\/tags?post=6496"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}