How to Sort by Column in Excel to Keep Rows Together

In this article, we will show how to sort by column in Excel while keeping rows together. Sorting is the best way to make the dataset more convenient and acceptable. This makes our work with datasets in various ways. MS Excel provides different ways to sort data for different purposes.


Download the Practice Workbook


4 Ways to Sort by Column while Keeping Rows Together

In this article, we will discuss 5 ways of how to sort by column in Excel while keeping rows together. Firstly, we will use the Sort command. Secondly, we will go for the Advanced Sort command. Thirdly, we will sort the columns alphabetically. Then, we will sort multiple columns using the Sort command. Finally, we will use the SORT function to sort multiple columns alphabetically while keeping the rows together.

1. Using Sort Command

In this method, we will sort a dataset by column and keep the rows together. In the process, we will use the Sort command. This command will sort the column according to our need.

Steps:

  • Firstly, select the cells in the range D5:D10.
  • Secondly, go to the Data tab.
  • Thirdly, from the Sort & Filter group, choose Sort.
  • As a result, a prompt will be on the screen.

selecting sort command to sort by column to keep rows together in excel

  • From the prompt, first, select Expand the selection.
  • Then, click on Sort.

  • Consequently, the Sort dialogue box will be on the screen.
  • From the box, select the order of your sorting.
  • In this case, we will select Smallest to Largest.
  • Then, click OK.

selecting order of sorting to sort by column to keep rows together in excel

  • Consequently, the column will be sorted.


2. Sorting Column Alphabetically 

In this example, we will sort a column alphabetically while keeping the rows together. We will use the Advanced Sort command. This operation will arrange the names according to the alphabets.

Steps:

  • To begin with, select the cells in the range C5:C10.
  • Then, go to the Data tab.
  • Finally, from the Sort & Filter group, select Sort A to Z.
  • Consequently, a prompt will appear on the screen.

selecting sort a to z to sort by column to keep rows together in excel

  • From the prompt, select Expand the selection.
  • Then, select Sort.

  • As a result, the column will be sorted alphabetically.


3. Sorting by Multiple Columns 

In this instance, we will sort the dataset by multiple columns. The sorting will be done, firstly by a particular column and then by another column. This will allow users to prioritize their sorting options.

Steps:

  • To start with, choose the dataset.
  • Then, select the Sort command from the Data tab.
  • As a result, a prompt will appear on the screen.

  • In the prompt, first, choose the Add Level option.
  • After that, select Name column in the Sort by option.
  • Then, choose Region column in the Then by option.
  • Finally, click OK.

selecting multiple columns to sort by column to keep rows together in excel

  • As a result, the data set will be sorted by the two columns.


4. Sorting Multiple Column Alphabetically with SORT Function

The SORT function sorts any array of data, and the users could specify how many columns to sort. In this example, we will sort all four of our columns using the SORT function.

Steps:

  • Firstly, select the B13 cell and type,
=SORT(B5:E10,4)
  • Then, hit Enter.
  • As a result, the dataset will be sorted accordingly.

using sort function to sort by column to keep rows together in excel


Conclusion

In this article, we have talked about how to sort by column in Excel while keeping rows together. These are some ways to sort by column with keeping rows together in Excel. I have shown all the methods with their respective examples but there can be many other iterations. I have also discussed the fundamentals of the used functions. If you have any other method of achieving this, then please feel free to share it with us.


Further Readings

Md. Abdullah Al Murad

Md. Abdullah Al Murad

Hello! Welcome to my Profile. Currently, I am working and researching Microsoft Excel, and here I will be posting articles related to this. My last educational degree is BSc, and my program was Computer Science and Engineering from American International University-Bangladesh. I am a Computer Science graduate with a great interest in research and development. Always try to gather knowledge from various sources and try to make innovative solutions.

We will be happy to hear your thoughts

Leave a reply

5 Excel Tips
You Never Knew

Genius tips to help you unlock Excel's hidden features

FREE EMAIL BONUS

ExcelDemy
Logo