قالب وردپرس درنا توس
Home / Tips and Tricks / How to sort by multiple columns in Google Sheets

How to sort by multiple columns in Google Sheets



Google Sheets

If you analyze complex data sets in Google Sheets, you can use the built-in sorting function to organize the data. You can sort by individual columns or, for more complex data, sort by multiple columns.

To do this, you need to open your Google Sheets spreadsheet and select the record you want to sort. You can do this manually by selecting the cells with your mouse or by selecting one of the cells in your dataset and pressing Ctrl + A on your keyboard.

CONNECTED: The beginner̵

7;s guide to Google Sheets

Once your data is selected, from the Google Sheets menu, click Data> Sort Area.

To sort data in Google Sheets, select your record and press Sort> Sort Area.  “Width =” 570 “height =” 370 “onload =” pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon (this);  “onerror =” this.onerror = null;  pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon (this);  “/></p>
<p>In the “Sorting area” radio button, you can choose how you want to sort your data.</p>
<p>You can select the column by which to sort and choose whether to sort in ascending or descending order.  Click on “Data has header” to be able to select columns in the header cell.</p>
<p><img class=

By default, Google Sheets only offers one column for sorting. To add multiple columns to your sort options, select the “Add Another Sort Column” button.

Press

When you sort by multiple columns in Google Sheets, the sorting is from top to bottom. For example, a sample table shows product sales data with product names, sales dates, and prices.

To sort this data by name and then by quantity sold, you must first select the Product Name column in Column A (labeled “Product”), then select the column in Column C (labeled “Price”).

A Google Sheets sort option field with multiple columns added.

You can sort this in ascending order, starting with product names at the beginning of the alphabet at the top, and then with prices sorted by the smallest amount. Select “AZ” to sort that way or “ZA” to sort in descending order instead.

You can mix and match these options too. In this example, you can sort by product name in ascending order and by sales amount in descending order.

In the Google Sheets Sorting Options box, select

Once your sorting options are set, select the “Sort” button to sort your data. The data in your spreadsheet will be rearranged according to the rules set in the Sort Area radio button.

A sample data set in Google Sheets, sorted with the integrated sorting tool.

In this example, the above data has been sorted with product names and prices in ascending order. This is evident in the monitor and mouse products.

At a price of USD 100, the monitor would be in second position if the sorting were only performed in the “Price” column (column C). Since the sorting was carried out first in the “Product” column (column A), the monitor sold was placed in front of the mouse.

Examples of sorted Google Sheets data with single and multi-column sorting.

You can undo any of these sorts by doing a different sort on your record, pressing the Undo button on the menu bar, or pressing Ctrl + Z on your keyboard.

CONNECTED: All the best Google Sheets keyboard shortcuts




Source link