{"id":2520,"date":"2020-11-06T15:30:07","date_gmt":"2020-11-06T14:30:07","guid":{"rendered":"https:\/\/importsheet.com\/?p=2520"},"modified":"2025-06-16T21:31:05","modified_gmt":"2025-06-16T19:31:05","slug":"formule-de-tri-google-sheets","status":"publish","type":"post","link":"https:\/\/www.sheetgo.com\/fr\/blog\/google-sheets-formulas\/sort-formula-google-sheets\/","title":{"rendered":"Comment utiliser la fonction SORT de Google Sheets ?"},"content":{"rendered":"<p>[et_pb_section fb_built=&#8221;1&#8243; admin_label=&#8221;section&#8221; module_class=&#8221;sheetgo-post&#8221; _builder_version=&#8221;4.16&#8243; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221; da_is_popup=&#8221;off&#8221; da_exit_intent=&#8221;off&#8221; da_has_close=&#8221;on&#8221; da_alt_close=&#8221;off&#8221; da_dark_close=&#8221;off&#8221; da_not_modal=&#8221;on&#8221; da_is_singular=&#8221;off&#8221; da_with_loader=&#8221;off&#8221; da_has_shadow=&#8221;on&#8221; da_disable_devices=&#8221;off|off|off&#8221;][et_pb_row admin_label=&#8221;row&#8221; _builder_version=&#8221;4.16&#8243; background_size=&#8221;initial&#8221; background_position=&#8221;top_left&#8221; background_repeat=&#8221;repeat&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;][et_pb_column type=&#8221;4_4&#8243; _builder_version=&#8221;4.16&#8243; custom_padding=&#8221;|||&#8221; global_colors_info=&#8221;{}&#8221; custom_padding__hover=&#8221;|||&#8221; theme_builder_area=&#8221;post_content&#8221;][et_pb_text _builder_version=&#8221;4.24.1&#8243; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<p><span style=\"font-weight: 400;\">The Google Sheets SORT function allows you to sort data and return the rows in ascending or descending order. It is useful to sort text, numbers and even dates. Additionally, you can do vertical or horizontal sorting.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">This function also allows you to add multiple criteria across columns, in a similar way to the \u201cSort Range\u201d functionality in the Google Sheets menu bar. The difference is that with the SORT function you can generate a new set of data while the original data remains intact.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">The Google Sheets SORT formula is also helpful when working with other functions such as <\/span><a href=\"https:\/\/www.sheetgo.com\/blog\/google-sheets-formulas\/lookup-formula-google-sheets\/\"><span style=\"font-weight: 400;\">LOOKUP<\/span><\/a><span style=\"font-weight: 400;\"> that only work with sorted data.<\/span><\/p>\n<h2><span style=\"font-weight: 400;\">Syntax<\/span><\/h2>\n<p>[\/et_pb_text][et_pb_text module_class=&#8221;spreadsheet-function&#8221; _builder_version=&#8221;4.16&#8243; border_width_left=&#8221;4px&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<p>=SORT(range, sort_column, is_ascending, [sort_column2, is_ascending2, \u2026])<\/p>\n<p>[\/et_pb_text][et_pb_text _builder_version=&#8221;4.24.1&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<ul>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><b>range<\/b><span style=\"font-weight: 400;\"> \u2013 cell range you want to sort. This can span across several columns to make <\/span><span style=\"font-weight: 400;\">google sheets sort multiple columns.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><b>sort_column<\/b><span style=\"font-weight: 400;\"> \u2013 is the column that the data will be sorted by. You can specify the column in three ways:<\/span>\n<ul>\n<li style=\"font-weight: 400;\" aria-level=\"2\"><span style=\"font-weight: 400;\">An index number to specify the column number within the <\/span><b>range<\/b><span style=\"font-weight: 400;\"> (e.g. if the range is A:C and we set this to 2 the function will take column B as reference).<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"2\"><span style=\"font-weight: 400;\">A cell range of a column within <\/span><b>range<\/b><span style=\"font-weight: 400;\">. This must include one single column that covers all the existing rows within the <\/span><b>range<\/b><span style=\"font-weight: 400;\">. Otherwise, the function returns a #N\/A! error.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"2\"><span style=\"font-weight: 400;\">If you leave this blank, the function assumes that the sort column is column 1 (i.e. the first column in <b>range<\/b>).<\/span><\/li>\n<\/ul>\n<\/li>\n<li style=\"font-weight: 400;\" aria-level=\"2\"><b>is_ascending<\/b><span> \u2013 takes the values TRUE or FALSE to specify the order of data arrangement. It will sort the data in ascending order if set to TRUE, and in descending order if set to FALSE. If you don\u2019t input a value, the function automatically sorts the data in ascending order.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"2\"><b>sort_column2, is_ascending2, \u2026 &#8211; <span style=\"font-weight: 400;\">These are optional parameters that can be used to do a multiple column sort. The rules for these parameters remain the same as the ones above. These extra parameters will make <\/span><span style=\"font-weight: 400;\">google sheets sort multiple columns.<\/span><\/b><\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<p>[\/et_pb_text][et_pb_text admin_label=&#8221;Connections T &#8211; One tool &#8211; Horizontal&#8221; module_class=&#8221;sheetgo-post-no-shadow-img md2-contained-button vertical-banner-container&#8221; _builder_version=&#8221;4.27.4&#8243; _module_preset=&#8221;default&#8221; background_color=&#8221;#f2f7ff&#8221; max_width=&#8221;700px&#8221; module_alignment=&#8221;center&#8221; max_height=&#8221;300px&#8221; custom_margin=&#8221;20px|0px|20px|0px|true|true&#8221; custom_padding=&#8221;25px|25px|25px|25px|true|true&#8221; sticky_limit_bottom=&#8221;section&#8221; border_radii=&#8221;on|20px|20px|20px|20px&#8221; border_width_all=&#8221;1px&#8221; border_color_all=&#8221;#d9e7ff&#8221; global_colors_info=&#8221;{}&#8221; global_module=&#8221;255434&#8243; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/static.sheetgo.com\/wp-content\/uploads\/2024\/09\/connections-top-processors-main.webp\" width=\"250\" height=\"168\" alt=\"\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/static.sheetgo.com\/wp-content\/uploads\/2024\/09\/Recommended-for-Google-Workspace-badge.webp\" width=\"150\" height=\"180\" alt=\"39\" \/><\/p>\n<p><span style=\"font-size: 22px; font-weight: 600;\">One tool to merge, split, and filter all your spreadsheet data<\/span><\/p>\n<p><a href=\"https:\/\/www.sheetgo.com\/connections\/\" target=\"_blank\" rel=\"noopener\">Find out how<\/a><\/p>\n<p>[\/et_pb_text][et_pb_text _builder_version=&#8221;4.24.1&#8243; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<h2>How to use the Google Sheets SORT function<\/h2>\n<p>To demonstrate the benefits of the SORT function, I will be showing both the reference data as well as the resulting data that Google Sheets returns. Below are some of the main ways to use the SORT function.<\/p>\n<p>[\/et_pb_text][et_pb_text _builder_version=&#8221;4.24.1&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<h3>Basic sorting<\/h3>\n<p>Syntax: =SORT(range, column_index, ascending_order)<\/p>\n<p>This is the most basic example of how to use the SORT function.<\/p>\n<p>I have some data and I want to sort it alphabetically by name.<\/p>\n<p>I do this by typing in <strong>=sort(A3:C16,2,True)<\/strong>. As you can see, I am sorting the range A3:C16 on the second (Name) column in ascending order. The function rearranges the rows of data to give me the alphabetical order that I want.<\/p>\n<p>[\/et_pb_text][et_pb_image src=&#8221;https:\/\/static.sheetgo.com\/wp-content\/uploads\/2020\/11\/Sort-image-1-2.png&#8221; alt=&#8221;sort-function-google-sheets-1&#8243; title_text=&#8221;Sort image 1 (2)&#8221; _builder_version=&#8221;4.23.1&#8243; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;][\/et_pb_image][et_pb_text _builder_version=&#8221;4.16&#8243; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<p>I have typed in the function in cell D3, and the one thing to notice is that the function outputs the data from cell D3 onwards (down and to the right).<\/p>\n<p>The number of columns and rows this function returns is the same as that of the input <strong>range<\/strong>. So it is very important to keep the cells where the data is expected to flow, clear of any values. Otherwise, the function returns a #REF! error, as you can see below.<\/p>\n<p>[\/et_pb_text][et_pb_image src=&#8221;https:\/\/static.sheetgo.com\/wp-content\/uploads\/2020\/11\/Sort-image-2-1.png&#8221; alt=&#8221;sort-function-google-sheets-2&#8243; title_text=&#8221;Sort image 2 (1)&#8221; _builder_version=&#8221;4.16&#8243; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;][\/et_pb_image][et_pb_text _builder_version=&#8221;4.24.1&#8243; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<h3><b>Google Sheets sort by multiple columns<\/b><\/h3>\n<p>Syntax: =SORT(range, column_index1, ascending_order1, column_index2, descending_order2)<\/p>\n<p>Here I want to sort the data by multiple columns. When sorting by multiple columns, the first column that you specify (<strong>column_index1<\/strong>) takes priority, and the function sorts the data by the values in this column, just like in the previous example.<\/p>\n<p>The function then looks at the second sort column and performs any sorting by that column that can be carried out without breaking the rules of the first column sorting.<\/p>\n<p>In the example below, I first sort the range in ascending order on the second (Name) column, and then in ascending order on the first (ID) column. I do this by typing <strong>=sort(A3:C16,2,True,1,True)<\/strong>.<\/p>\n<p>[\/et_pb_text][et_pb_image src=&#8221;https:\/\/static.sheetgo.com\/wp-content\/uploads\/2020\/11\/Sort-image-3-1.png&#8221; alt=&#8221;sort-function-google-sheets-3&#8243; title_text=&#8221;Sort image 3 (1)&#8221; _builder_version=&#8221;4.16&#8243; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;][\/et_pb_image][et_pb_text _builder_version=&#8221;4.16&#8243; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<p>Notice that the second sort (by ID) caused the two Carolines to change order. The Caroline with the numerically lower ID number was rearranged to be before the other Caroline.<\/p>\n<p>This is the effect of a multiple sort: the first sort (by name) has priority, and the second sort (by ID number) only affects rows that can be rearranged while remaining properly sorted by name.<\/p>\n<p>[\/et_pb_text][et_pb_text _builder_version=&#8221;4.24.1&#8243; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<h3><b>Sorting with Column References<\/b><\/h3>\n<p>Syntax: =SORT(range, column_reference1, ascending_order1, column_reference2, descending_order2)<\/p>\n<p>Up to this point, I\u2019ve used the column index number to tell the function which column I want the data to be sorted by.<\/p>\n<p>Now, for the <strong>sort_column<\/strong> parameter, I\u2019ll try inputting the column references instead of column indexes. To do this, I type <strong>=sort(A3:C16,B3:B16,False,A3:A16,True)<\/strong>.<\/p>\n<p>[\/et_pb_text][et_pb_image src=&#8221;https:\/\/static.sheetgo.com\/wp-content\/uploads\/2020\/11\/Sort-image-4-1.png&#8221; alt=&#8221;sort-function-google-sheets-4&#8243; title_text=&#8221;Sort image 4 (1)&#8221; _builder_version=&#8221;4.16&#8243; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;][\/et_pb_image][et_pb_text _builder_version=&#8221;4.16&#8243; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<p>Notice how the data is sorted by name in reverse alphabetical order \u2013 that\u2019s because I typed FALSE for the <strong>ascending_order1<\/strong> parameter, which tells the function to sort in descending order.<\/p>\n<p>What happens when the column reference doesn\u2019t cover all the rows within the <strong>range<\/strong>? Let\u2019s try that (hint: SORT function returns an #N\/A! error!). It also returns an error if the column reference is larger than the <strong>range<\/strong>.<\/p>\n<p>[\/et_pb_text][et_pb_image src=&#8221;https:\/\/static.sheetgo.com\/wp-content\/uploads\/2020\/11\/Sort-image-5-1.png&#8221; alt=&#8221;sort-function-google-sheets-5&#8243; title_text=&#8221;Sort image 5 (1)&#8221; _builder_version=&#8221;4.16&#8243; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;][\/et_pb_image][et_pb_text _builder_version=&#8221;4.24.1&#8243; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<h3><b>Sorting by date<\/b><\/h3>\n<p>Syntax: SORT(range, column_index, ascending_order)<\/p>\n<p>Another convenient use of the SORT function is its ability to sort by date. Because the date in a spreadsheet is essentially just a number, you\u2019re able to sort by date in exactly the same way you would sort numerically or alphabetically.<\/p>\n<p>In the example below, I\u2019ve added a column with some dates, and I\u2019ll sort from oldest to most recent date by typing in <strong>=sort(A3:C16,3,True)<\/strong>.<\/p>\n<p>[\/et_pb_text][et_pb_image src=&#8221;https:\/\/static.sheetgo.com\/wp-content\/uploads\/2020\/11\/Sort-image-6-1.png&#8221; alt=&#8221;sort-function-google-sheets-6&#8243; title_text=&#8221;Sort image 6 (1)&#8221; _builder_version=&#8221;4.16&#8243; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;][\/et_pb_image][et_pb_text _builder_version=&#8221;4.24.1&#8243; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<h3>Horizontal sorting<\/h3>\n<p>Syntax: =Transpose(SORT(Transpose(range,) column_index, ascending_order))<\/p>\n<p>While a vertically listed data set is common, there are of course times when you may have data that is listed horizontally.<\/p>\n<p>Fortunately, the SORT function can still be used for horizontal data sets! All you have to do is use the <a href=\"https:\/\/www.sheetgo.com\/blog\/google-sheets-formulas\/transpose-formula-google-sheets\/\" target=\"_blank\" rel=\"noopener\">TRANSPOSE function<\/a> in combination with the SORT function.<\/p>\n<p>The TRANSPOSE function transposes the rows and columns of an array, essentially flipping them. This is required because the SORT function is designed to use data in a vertical format. By transposing horizontally listed data, you get a list that the SORT function is able to work with.<\/p>\n<p>Once it is sorted, it gets transposed back to its original horizontal format \u2013 that\u2019s why the TRANSPOSE function is used twice!<\/p>\n<p>[\/et_pb_text][et_pb_image src=&#8221;https:\/\/static.sheetgo.com\/wp-content\/uploads\/2020\/11\/Sort-image-7-1.png&#8221; alt=&#8221;sort-function-google-sheets-7&#8243; title_text=&#8221;Sort image 7 (1)&#8221; _builder_version=&#8221;4.16&#8243; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;][\/et_pb_image][et_pb_text _builder_version=&#8221;4.16&#8243; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<p>In the above example, I\u2019ve taken a horizontal data set and sorted it by typing <strong>=Transpose(SORT(Transpose(B1:F2),1,TRUE))<\/strong>.<\/p>\n<p>[\/et_pb_text][et_pb_text _builder_version=&#8221;4.24.1&#8243; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<h3>Sorting by a range outside the sort range<\/h3>\n<p>Syntax: <strong>SORT(range, column_reference, ascending_order)<\/strong><\/p>\n<p>There may be times when the value that you want to sort your data by is not actually included in the range of the data you\u2019re sorting. This sounds complicated, but it is really quite a simple and convenient way that you can use the SORT function.<\/p>\n<p>The example below will illustrate what I mean.<\/p>\n<p>[\/et_pb_text][et_pb_image src=&#8221;https:\/\/static.sheetgo.com\/wp-content\/uploads\/2021\/05\/SORT.png&#8221; alt=&#8221;SORT FORMULA GOOGLE SHEETS&#8221; title_text=&#8221;SORT FORMULA GOOGLE SHEETS&#8221; module_class=&#8221;sheetgo-post-no-shadow-img&#8221; _builder_version=&#8221;4.16&#8243; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;][\/et_pb_image][et_pb_text _builder_version=&#8221;4.24.1&#8243; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<p>In this example, there is some basic data, along with some additional data that shows the start date of each person.<\/p>\n<p>To sort by start date, but without actually including the start date in the range (and therefore the output) of the SORT function, you simply reference the range of start dates as the column_index. I\u2019ve done that here by typing =sort(A3:C16,I3:I16,True).<\/p>\n<p>Notice that this function is the same as previous examples, with the only difference being that the sort range (in column I) is not actually within the data range (in columns A:C). Thankfully, the SORT function is still able to compute this, and it returns the list of names sorted by their start date.<\/p>\n<h3>Did you like this article?<\/h3>\n<p>If you found this post useful, share it with your network via the social media buttons on the left.<\/p>\n<p>Find more data management tips and tricks in our post on\u00a0<a href=\"https:\/\/www.sheetgo.com\/blog\/spreadsheets-tips\/data-filters-and-sorting-in-google-sheets\/\" target=\"_blank\" rel=\"noopener noreferrer\">data filters and sorting in Google<\/a><a href=\"https:\/\/www.sheetgo.com\/blog\/spreadsheets-tips\/data-filters-and-sorting-in-google-sheets\/\" target=\"_blank\" rel=\"noopener noreferrer\"> Sheets.<\/a><a href=\"https:\/\/www.sheetgo.com\/blog\/spreadsheets-tips\/data-filters-and-sorting-in-google-sheets\/\" target=\"_blank\" rel=\"noopener noreferrer\"><\/a><\/p>\n<p>[\/et_pb_text][et_pb_text _builder_version=&#8221;4.22.2&#8243; background_color=&#8221;#f9f9ff&#8221; custom_margin=&#8221;40px||40px||false|false&#8221; custom_padding=&#8221;15px|25px|15px|25px|true|true&#8221; border_width_left=&#8221;3px&#8221; border_color_left=&#8221;#808e95&#8243; saved_tabs=&#8221;all&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<p><em><strong>Editor\u2019s note<\/strong>: This is a revised version of a previous post that has been updated for accuracy and comprehensiveness.<\/em><\/p>\n<p>[\/et_pb_text][\/et_pb_column][\/et_pb_row][\/et_pb_section]<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The Google Sheets SORT function allows you to sort data and return the rows in ascending or descending order. It is useful to sort text, numbers and even dates. Additionally, you can do vertical or horizontal sorting. This function also allows you to add multiple criteria across columns, in a similar way to the \u201cSort [&hellip;]<\/p>\n","protected":false},"author":40,"featured_media":29302,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_et_pb_use_builder":"on","_et_pb_old_content":"The <a href=\"https:\/\/support.google.com\/docs\/answer\/3093150?hl=en\">SORT<\/a>\u00a0formula in Google Sheets, helps us sort and return the rows in a range either in ascending or descending order. It also\u00a0allows us to add multiple criteria across columns, similar to that of 'Sort Range' functionality within Google Sheets. Except, with the SORT formula, we will be able to generate a new set of data while the original data remains intact.\u00a0The test data we'll consider in order to explore the SORT formula is as shown in the image below.\n\n<img class=\"aligncenter size-full wp-image-2522\" src=\"https:\/\/static.sheetgo.com\/wp-content\/uploads\/2017\/11\/sort1.png\" alt=\"SORT Formula - Illustration 1\" width=\"351\" height=\"388\" \/>\n<h3>Syntax<\/h3>\n<span style=\"font-family: courier new,courier,monospace; font-size: 14pt;\"><strong>SORT(range, sort_column, is_ascending, [sort_column2, is_ascending2, ...])<\/strong><\/span>\n<ul>\n \t<li><span style=\"font-family: courier new,courier,monospace; font-size: 12pt;\"><strong>range<\/strong><\/span>\u00a0\u2013 is the reference to the group of cells\u00a0that the SORT formula uses that to arrange the rows as specified in the next two parameters.<\/li>\n \t<li><span style=\"font-family: courier new,courier,monospace; font-size: 12pt;\"><strong>sort_column<\/strong>\u00a0<\/span>\u2013 this can be two things, which essentially are the same.\n<ul>\n \t<li>An index number to specify a\u00a0column number in the <strong><span style=\"font-family: 'courier new', courier, monospace; font-size: 12pt;\">range<\/span><\/strong>\u00a0on which Google Sheets needs to sort.<\/li>\n \t<li>A\u00a0reference (or address) of\u00a0a column within the <strong><span style=\"font-size: 12pt; font-family: 'courier new', courier, monospace;\">range<\/span><\/strong> of cells that we are sorting. Please note the column reference should include one single column that covers all the existing rows within the <strong><span style=\"font-family: 'courier new', courier, monospace; font-size: 12pt;\">range<\/span><\/strong>. Otherwise, the formula returns an #N\/A! error.<\/li>\n<\/ul>\n<\/li>\n \t<li><span style=\"font-family: courier new,courier,monospace; font-size: 12pt;\"><strong>is_ascending<\/strong><\/span>\u00a0\u2013 this parameter takes in the values TRUE or FALSE to specify the order of data arrangement. It will be sorted in\u00a0ascending order if TRUE, and in descending order if the option is FALSE.<\/li>\n \t<li><span style=\"font-family: 'courier new', courier, monospace; font-size: 12pt;\"><strong>sort_column2, is_ascending2, ...\u00a0<\/strong><\/span>\n<ul>\n \t<li>While the syntax for these parameters remains the same as that of the above two, these are\u00a0optional and will be effective in case we are going for multiple column sort.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h3>Use Cases: SORT Formula<\/h3>\nFor the ease of reference and understanding, I will be showing both the reference data as well as the resulting data that Google Sheets returned. Following are some of the use cases corresponding to this formula.\n<h5>Use Case\u00a0# 1: SORT(range, column_index, ascending_order)<\/h5>\nI'm keying in the formula in cell D3, and will hit Enter key. We'll see the returned data flows from D3 towards right and further down.\u00a0The number of columns and rows returned by this formula is same as that of the input <strong><span style=\"font-family: 'courier new', courier, monospace; font-size: 12pt;\">range<\/span><\/strong>. So it is very important that we keep the cells where the data is expected to flow, clear of any values. Otherwise, the formula returns #REF! error.\n\n<img class=\"aligncenter size-full wp-image-2525\" src=\"https:\/\/static.sheetgo.com\/wp-content\/uploads\/2017\/11\/sort2.png\" alt=\"SORT Formula - Illustration 2\" width=\"676\" height=\"417\" \/>\n\nAs you may have inferred from the formula, we are sorting the range A3;C16 on the second (Name) column in ascending order.\n\n<img class=\"aligncenter size-full wp-image-2526\" src=\"https:\/\/static.sheetgo.com\/wp-content\/uploads\/2017\/11\/sort3.png\" alt=\"SORT Formula - Illustration 3\" width=\"654\" height=\"441\" \/>\n\nIf by any chance, there are values present in columns C or D or E, the formula returns an error as shown in the image below.\n\n<img class=\"aligncenter size-full wp-image-2528\" src=\"https:\/\/static.sheetgo.com\/wp-content\/uploads\/2017\/11\/sort4.png\" alt=\"SORT Formula - Illustration 4\" width=\"679\" height=\"439\" \/>\n<h5>Use Case # 2:\u00a0SORT(range, column_index1, ascending_order1, column_index2, descending_order2)<\/h5>\nThis is a simple case of sorting on\u00a0multiple columns. With the formula below, we are first sorting the range in ascending order on the second (Name) column, and then in descending order on the first (ID) column.\n\n<img class=\"aligncenter size-full wp-image-2530\" src=\"https:\/\/static.sheetgo.com\/wp-content\/uploads\/2017\/11\/sort5.png\" alt=\"SORT Formula - Illustration 5\" width=\"655\" height=\"441\" \/>\n<h5>Use Case # 3: SORT(range, column_reference1, ascending_order1, column_reference2, descending_order2)<\/h5>\nNow, for the <span style=\"font-family: 'courier new', courier, monospace; font-size: 12pt;\"><strong>sort_column<\/strong><\/span> parameter, we'll try inputting the column references instead of column indexes.\n\n<img class=\"aligncenter size-full wp-image-2531\" src=\"https:\/\/static.sheetgo.com\/wp-content\/uploads\/2017\/11\/sort6.png\" alt=\"SORT Formula - Illustration 6\" width=\"656\" height=\"441\" \/>\n\nWe may be curious, as to what happens when the column reference doesn't cover all the rows within the range. Let's try that (hint: SORT formula\u00a0returns an #N\/A! error!).\n\n<img class=\"aligncenter size-full wp-image-2532\" src=\"https:\/\/static.sheetgo.com\/wp-content\/uploads\/2017\/11\/sort7.png\" alt=\"SORT Formula - Illustration 7\" width=\"678\" height=\"439\" \/>\n\nLearn more about the SORT formula and the data filters to the folowing blog post: \"<strong><a href=\"https:\/\/www.sheetgo.com\/blog\/spreadsheets-tips\/data-filters-and-sorting-in-google-sheets\/\">Data filters and sorting in Google Sheets<\/a><\/strong>\"","_et_gb_content_width":"","footnotes":""},"categories":[54],"tags":[39,28],"class_list":["post-2520","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-google-sheets-formulas","tag-connections-t","tag-spreadsheets"],"acf":[],"_links":{"self":[{"href":"https:\/\/www.sheetgo.com\/fr\/wp-json\/wp\/v2\/posts\/2520","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.sheetgo.com\/fr\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.sheetgo.com\/fr\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.sheetgo.com\/fr\/wp-json\/wp\/v2\/users\/40"}],"replies":[{"embeddable":true,"href":"https:\/\/www.sheetgo.com\/fr\/wp-json\/wp\/v2\/comments?post=2520"}],"version-history":[{"count":0,"href":"https:\/\/www.sheetgo.com\/fr\/wp-json\/wp\/v2\/posts\/2520\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.sheetgo.com\/fr\/wp-json\/wp\/v2\/media\/29302"}],"wp:attachment":[{"href":"https:\/\/www.sheetgo.com\/fr\/wp-json\/wp\/v2\/media?parent=2520"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.sheetgo.com\/fr\/wp-json\/wp\/v2\/categories?post=2520"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.sheetgo.com\/fr\/wp-json\/wp\/v2\/tags?post=2520"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}