![]() Check out the article linked below to learn how to use the FILTER function: Using the SORT and FILTER functions togetherĪnother very common and very useful function that you might want to learn, is the FILTER function. (You can also click the link to the article to learn the same thing in written format) In the video below, you will learn how to use the SORT function with the FILTER function, as individual functions, and combined into one formula. In Google Sheets, you can combine multiple functions in to a single formula. Using the SORT function with the FILTER function This is the tab named "Demographics", where the source data is located: The formula: The formula below, is entered in the blue cell (A3), for this example The logic: Sort the range A3:E, on the tab labeled "Demographics", by the third column in ascending order The task: Sort the data on the "Demographics" tab, by city, from A to Z ![]() Let's take a look at an example of putting this into action. If your tab name has a space in it, make sure to include apostrophes before and after the tab name, like this: For example, here we will reference the tab named "Demographics" and so our reference looks like this: To do this simply add the name of the tab that you want to reference as well as an exclamation point, before typing the range. This can be done by specifying the tab name in the data range for your SORT formula. You may often find the need to sort data that is on another tab, where your formula output is on a tab that is separate from the tab that contains your source data. The formula: The formula below, is entered in the blue cell (C2), for this example The logic: Sort the range A2:A, by column 1 in ascending order The task: Sort the list of dates from earliest to most recent You can also sort data by date, by using the SORT function in Google Sheets.ĭates in a spreadsheet are really just numbers, and so earlier dates are simply just smaller numbers than later dates, making it easy to use the SORT function to sort by date. Note that the image below shows the same sorted results as in the example above, with the slight modification in the formula. Either way is an acceptable way to use the SORT function. The first formula refers to the second column which is column B, and the second formula refers to the range B3:B, which is again column B. Note that the two formulas below will do the same thing. For example, let's achieve the same task as the formula in the example above, but we will specify a range rather than a column number. If you would like, instead of entering a column number to specify the column that you want to sort by, you can enter the range of the column that you want to sort by. ![]() Sorting by a range instead of a column number The formula: The formula below, is entered in the blue cell (C3), for this exampleįormula with same functionality: =SORT(A3:A,1,true)Ĭontent originally created by Corey Bustos / The logic: Sort column A (A3:A) in ascending order The task: Sort the list of names in column A, from A to Z Notice that in this example the data is all text, and so the data will be sorted alphabetically. This is perfect for sorting a basic list of names, as is shown below. In other words if you don't specify a column number and sort order, then Google Sheets will assume it is the first column in ascending order. You will see that both of the formulas below do the same thing, where one has the column and order specified and the other doesn't. When you want to sort by the first column in ascending order, you don't have to specify the column number or the TRUE / FALSE order designation. SORT(range, sort_column, is_ascending,, )įormula summary: “Sorts the rows of a given array or range by the values in one or more columns.” Sorting a single column in ascending orderįirst, I am going to show you how to sort a single column of data, in ascending order, with the SORT function. The Google Sheets SORT function description: ![]() ![]() When specifying the order to sort by in your SORT function, choose one of the following options: However if you are sorting range B2:Z, and you want to sort by column B, this would be designated as column "1", as it is the first column in the range that you specified. When specifying the column to sort by in your SORT function, type a number that represents the position of the column that you want to sort by, in reference to the range that you specified.įor example, if you are sporting the range A2:C, and you want to sort by column B, then this is column "2" in the range that you are sorting by. ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |