Forum Discussion
SORT
how to sort the excel data by using multiple id with their value and also order the same id is same row?
1 Reply
- NikolinoDEGold Contributor
To sort Excel data by multiple IDs with their corresponding values and ensure that rows with the same ID stay together, you can use the "Sort" feature in Excel.
Here is how you can do it:
- Select the range of data that you want to sort, including the ID column and the corresponding value column(s).
- Go to the "Data" tab in the Excel ribbon.
- Click on the "Sort" button. This will open the "Sort" dialog box.
- In the "Sort by" section, select the column that contains the ID you want to sort by.
- In the "Sort On" dropdown, choose "Values" (assuming your ID column contains values).
- In the "Order" dropdown, select the desired sorting order (e.g., "Smallest to Largest" or "Largest to Smallest").
- Click on the "Add Level" button to add another sorting level.
- In the new level, select the column that contains the values corresponding to the second ID you want to sort by.
- Repeat steps 5-8 for each additional ID and its corresponding value column(s) that you want to sort by.
- Click the "OK" button to apply the sorting.
Excel will sort the data based on the specified IDs and their corresponding values. Rows with the same ID will stay together, and the entire data range will be rearranged accordingly.
Note that when sorting by multiple levels, Excel applies the sorting criteria from left to right. So the first ID and its corresponding value(s) will be the primary sorting criteria, followed by the second ID and its corresponding value(s), and so on. Adjust the sort levels and order as needed to achieve the desired sorting result. The steps were processed using AI.
Hope this will help you.