How to Sort by Column in Excel and Keep Rows Together (4 Easy Ways)

Method 1 – Using the Sort Command to Sort by Column and Keep Rows Together

  • Select the cells in the range D5:D10.
  • Go to the Data tab.
  • From the Sort & Filter group, choose Sort.
  • A prompt will be on the screen.

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

  • Select Expand the selection.
  • Click on Sort.

  • The Sort dialogue box will be on the screen.
  • Select the order of your sorting. We selected Smallest to Largest.
  • Click OK.

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

  • The column will be sorted.

Read More: Sort Multiple Columns in Excel Independently of Each Other


Method 2 – Sorting a Column Alphabetically by Columns and Keeping Rows Together in Excel

  • Select the cells in the range C5:C10.
  • Go to the Data tab.
  • From the Sort & Filter group, select Sort A to Z.
  • A prompt will appear on the screen.

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

  • Select Expand the selection.
  • Select Sort.

  • The column will be sorted alphabetically.

Read More: How to Sort Columns in Excel Without Mixing Data


Method 3 – Sorting by Multiple Columns in Excel but Keeping the Rows Together

  • Choose the dataset.
  • Select the Sort command from the Data tab. A prompt will appear on the screen.

  • Choose the Add Level option.
  • Select the Name column in the Sort by option.
  • Choose the Region column in the Then by option.
  • Click OK.

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

  • The data set will be sorted by the two columns.

Read More: How to Sort Alphabetically in Excel and Keep Rows Together


Method 4 – Sorting Multiple Columns Alphabetically by Column with the SORT Function

  • Select the B13 cell and insert:
=SORT(B5:E10,4)
  • Hit Enter.
  • The dataset will be sorted accordingly.

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

Read More: Excel Sort by Column Without Header


Download the Practice Workbook


Further Reading


<< Go Back to Sort in Excel | Learn Excel

Get FREE Advanced Excel Exercises with Solutions!
Md. Abdullah Al Murad
Md. Abdullah Al Murad

Md. Abdullah Al Murad is a computer engineer who loves exploring Excel and VBA programming. Programming, to him, is a time-saving tool for efficiently managing data, files, and internet tasks. He is proficient in C, C++, Python, JavaScript, HTML, SQL, MySQL, PostgreSQL, Microsoft Office, and VBA and goes beyond the basics. He holds a B.Sc. in Computer Science and Engineering from American International University-Bangladesh. He has transitioned into the role of a content developer. Beyond his work, find... Read Full Bio

We will be happy to hear your thoughts

Leave a reply

Advanced Excel Exercises with Solutions PDF

 

 

ExcelDemy
Logo