{"id":97,"date":"2026-02-24T09:35:49","date_gmt":"2026-02-24T09:35:49","guid":{"rendered":"https:\/\/gigz.pk\/excel\/?post_type=lesson&#038;p=97"},"modified":"2026-03-10T08:08:36","modified_gmt":"2026-03-10T08:08:36","slug":"sort","status":"publish","type":"lesson","link":"https:\/\/gigz.pk\/excel\/lesson\/sort\/","title":{"rendered":"SORT"},"content":{"rendered":"\n<p>The <strong>SORT<\/strong> function is a Dynamic Array function that automatically sorts data in ascending or descending order.<br>It updates instantly when the source data changes.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Syntax<\/h2>\n\n\n\n<pre class=\"wp-block-preformatted\">=SORT(array, [sort_index], [sort_order], [by_col])<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Arguments:<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>array<\/strong> \u2192 The range to sort<\/li>\n\n\n\n<li><strong>sort_index<\/strong> (optional) \u2192 Column number to sort by<\/li>\n\n\n\n<li><strong>sort_order<\/strong> (optional) \u2192 1 = Ascending, -1 = Descending<\/li>\n\n\n\n<li><strong>by_col<\/strong> (optional) \u2192 TRUE = sort by column, FALSE = sort by row<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Basic Example (Single Column)<\/h2>\n\n\n\n<p>If A2:A10 contains numbers:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">=SORT(A2:A10)<\/pre>\n\n\n\n<p>Sorts numbers in <strong>ascending order<\/strong>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Descending Order<\/h2>\n\n\n\n<pre class=\"wp-block-preformatted\">=SORT(A2:A10, 1, -1)<\/pre>\n\n\n\n<p>Sorts values in <strong>descending order<\/strong>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Sorting Multiple Columns<\/h2>\n\n\n\n<p>If you have:<\/p>\n\n\n\n<p>| Name | Department | Salary |<\/p>\n\n\n\n<p>To sort by Salary:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">=SORT(A2:C10, 3, -1)<\/pre>\n\n\n\n<p>Here:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>3 = Salary column<\/li>\n\n\n\n<li>-1 = Descending order<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Sorting by Text<\/h2>\n\n\n\n<pre class=\"wp-block-preformatted\">=SORT(A2:A10)<\/pre>\n\n\n\n<p>Sorts text alphabetically (A\u2013Z).<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">SORT with Tables (Recommended)<\/h2>\n\n\n\n<p>If your table name is Employees:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">=SORT(Employees, 3, -1)<\/pre>\n\n\n\n<p>Sorts entire table by third column.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Combine SORT with FILTER<\/h2>\n\n\n\n<pre class=\"wp-block-preformatted\">=SORT(FILTER(A2:C10, B2:B10=\"IT\"), 3, -1)<\/pre>\n\n\n\n<p>Filters IT department and sorts by Salary (descending).<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Combine SORT with UNIQUE<\/h2>\n\n\n\n<pre class=\"wp-block-preformatted\">=SORT(UNIQUE(A2:A10))<\/pre>\n\n\n\n<p>Returns sorted unique values.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Common Errors<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">#SPILL!<\/h3>\n\n\n\n<p>Occurs when the output range is blocked.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Important Notes<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Available in Excel 365 and Excel 2021+<\/li>\n\n\n\n<li>Automatically spills results<\/li>\n\n\n\n<li>Updates dynamically when data changes<\/li>\n\n\n\n<li>Does not modify original data<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">SORT vs Manual Sorting<\/h2>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>SORT Function<\/th><th>Manual Sort<\/th><\/tr><\/thead><tbody><tr><td>Dynamic<\/td><td>Static<\/td><\/tr><tr><td>Formula-based<\/td><td>One-time action<\/td><\/tr><tr><td>Updates automatically<\/td><td>Requires re-sorting<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Benefits of SORT<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Automatic updates<\/li>\n\n\n\n<li>Cleaner formulas<\/li>\n\n\n\n<li>Ideal for dashboards<\/li>\n\n\n\n<li>No need to manually sort data<\/li>\n\n\n\n<li>Works perfectly with FILTER and UNIQUE<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Conclusion<\/h2>\n\n\n\n<p>The SORT function is a powerful modern Excel feature that automatically arranges data in the desired order. It simplifies data organization and enhances dynamic reporting and analysis.<\/p>\n\n\n<div class=\"yoast-breadcrumbs\"><span><span><a href=\"https:\/\/gigz.pk\/excel\/\">Home<\/a><\/span> \u00bb <span class=\"breadcrumb_last\" aria-current=\"page\">Excel Advanced Analytics (EAA) > Advanced Formulas > SORT<\/span><\/span><\/div>\n\n\n<div class=\"schema-faq wp-block-yoast-faq-block\"><div class=\"schema-faq-section\" id=\"faq-question-1773064147936\"><strong class=\"schema-faq-question\"><\/strong> <p class=\"schema-faq-answer\"><\/p> <\/div> <\/div>\n\n\n\n<p><\/p>\n","protected":false},"menu_order":59,"template":"","class_list":["post-97","lesson","type-lesson","status-publish","hentry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>SORT - Learn Excel the Right Way.<\/title>\n<meta name=\"description\" content=\"Learn how to use the Excel SORT function to automatically organize data, sort columns or rows, and create dynamic reports.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/gigz.pk\/excel\/lesson\/sort\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"SORT - Learn Excel the Right Way.\" \/>\n<meta property=\"og:description\" content=\"Learn how to use the Excel SORT function to automatically organize data, sort columns or rows, and create dynamic reports.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/gigz.pk\/excel\/lesson\/sort\/\" \/>\n<meta property=\"og:site_name\" content=\"Learn Excel the Right Way.\" \/>\n<meta property=\"article:modified_time\" content=\"2026-03-10T08:08:36+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":[\"WebPage\",\"FAQPage\"],\"@id\":\"https:\\\/\\\/gigz.pk\\\/excel\\\/lesson\\\/sort\\\/\",\"url\":\"https:\\\/\\\/gigz.pk\\\/excel\\\/lesson\\\/sort\\\/\",\"name\":\"SORT - Learn Excel the Right Way.\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/gigz.pk\\\/excel\\\/#website\"},\"datePublished\":\"2026-02-24T09:35:49+00:00\",\"dateModified\":\"2026-03-10T08:08:36+00:00\",\"description\":\"Learn how to use the Excel SORT function to automatically organize data, sort columns or rows, and create dynamic reports.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/gigz.pk\\\/excel\\\/lesson\\\/sort\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/gigz.pk\\\/excel\\\/lesson\\\/sort\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/gigz.pk\\\/excel\\\/lesson\\\/sort\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/gigz.pk\\\/excel\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Excel Advanced Analytics (EAA) > Advanced Formulas > SORT\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/gigz.pk\\\/excel\\\/#website\",\"url\":\"https:\\\/\\\/gigz.pk\\\/excel\\\/\",\"name\":\"Learn Excel the Right Way.\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/gigz.pk\\\/excel\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"SORT - Learn Excel the Right Way.","description":"Learn how to use the Excel SORT function to automatically organize data, sort columns or rows, and create dynamic reports.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/gigz.pk\/excel\/lesson\/sort\/","og_locale":"en_US","og_type":"article","og_title":"SORT - Learn Excel the Right Way.","og_description":"Learn how to use the Excel SORT function to automatically organize data, sort columns or rows, and create dynamic reports.","og_url":"https:\/\/gigz.pk\/excel\/lesson\/sort\/","og_site_name":"Learn Excel the Right Way.","article_modified_time":"2026-03-10T08:08:36+00:00","twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":["WebPage","FAQPage"],"@id":"https:\/\/gigz.pk\/excel\/lesson\/sort\/","url":"https:\/\/gigz.pk\/excel\/lesson\/sort\/","name":"SORT - Learn Excel the Right Way.","isPartOf":{"@id":"https:\/\/gigz.pk\/excel\/#website"},"datePublished":"2026-02-24T09:35:49+00:00","dateModified":"2026-03-10T08:08:36+00:00","description":"Learn how to use the Excel SORT function to automatically organize data, sort columns or rows, and create dynamic reports.","breadcrumb":{"@id":"https:\/\/gigz.pk\/excel\/lesson\/sort\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/gigz.pk\/excel\/lesson\/sort\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/gigz.pk\/excel\/lesson\/sort\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/gigz.pk\/excel\/"},{"@type":"ListItem","position":2,"name":"Excel Advanced Analytics (EAA) > Advanced Formulas > SORT"}]},{"@type":"WebSite","@id":"https:\/\/gigz.pk\/excel\/#website","url":"https:\/\/gigz.pk\/excel\/","name":"Learn Excel the Right Way.","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/gigz.pk\/excel\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"}]}},"_links":{"self":[{"href":"https:\/\/gigz.pk\/excel\/wp-json\/wp\/v2\/lesson\/97","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/gigz.pk\/excel\/wp-json\/wp\/v2\/lesson"}],"about":[{"href":"https:\/\/gigz.pk\/excel\/wp-json\/wp\/v2\/types\/lesson"}],"wp:attachment":[{"href":"https:\/\/gigz.pk\/excel\/wp-json\/wp\/v2\/media?parent=97"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}