How to Sort Alphabetically and Keep Rows Together in Excel: 4 Smart Ways

Method 1 – Employ Sort Feature

1.1 Sort Alphabetically Without Empty Column

Steps:

  • Select any of the column cells that you want to sort. Sort based on the Country column.
  • Go to the Data tab, and you will find several sorting options. See an option called A to Z. The alphabetical order is A to Z. Use this option.
  • Click the option (A to Z).

Sort Alphabetically Without Empty Column

A Sort Warning dialog box will pop up. Find two options: Expand the selection and Continue with the current selection. Choose the second option; the data will be sorted, but only for the particular column that we have selected.

  • Select the Expand the selection option and click Sort.

Find the countries sorted alphabetically and the rows along with that.

Sort Alphabetically Keep Rows Together


1.2 Sort Alphabetically with Empty Column

Steps:

  • Insert a column in between the Continent and Capital columns.

Sort Alphabetically with Empty Column

  • Select the Country column and click the A to Z sort option.

  • The Sort Warning dialog box will pop up, and you know which option to select for the context of our task. Select Expand the selection and click Sort.

Sort Alphabetically Keep Rows Together

  • The countries are in alphabetical order, and each country changes its row position along with its respective continent. The capital, area, and population cause the mismatch. That didn’t change with the respective country. Excel counts the columns together as long as no empty column is found. Excel found an empty column after the Continent column.

  • Select the entire dataset first.
  • Click the A to Z option from the Data tab.

  • The Sort Warning box will not pop up, and you will find the sorted result.

Sort Alphabetically Keep Rows Together


Method 2 – Sort with a Specific Criterion

2.1 Sort Alphabetically Without Empty Column

Steps:

  • Select any column cells (i.e., Country) you want to sort.
  • Click the Sort option from the Data tab.

Sort Alphabetically Without Empty Column

A Sort Warning dialog box will appear.

  • Select Expand the selection and click Sort.

  • Click the dropdown icon under the Column section and select the column you want to sort by.
  • Mention the A to Z option from Order.
  • Click on OK.

Sort Alphabetically Keep Rows Together

Find the countries sorted alphabetically and the rows along with that.

Sort Alphabetically Keep Rows Together


2.2 Sort Alphabetically with Empty Column

Steps:

  • Select the entire dataset.
  • Click the Sort option from the Data tab.

Sort Alphabetically with Empty Column

  • Click the dropdown icon under the Column section and select the column you want to sort by (i.e., Column B).
  • Mention the A to Z option from Order.
  • Click OK.

You’ll have our desired output.

Sort Alphabetically Keep Rows Together


Method 3 – Use the SORT Function

Steps:

  • Pick a cell (i.e., H5) where you want the table sorted.
  • Input the following formula in that cell.
=SORT(B5:F18)

Use SORT Function

  • Press ENTER to have the sorted result.

Sort Alphabetically Keep Rows Together


Method 4 – Apply SORT BY Function

Steps:

  • Choose a cell (i.e., H5) where you want the table sorted.
  • Input the following formula in that cell.
=SORTBY(B5:F18,B5:B18)

Apply SORTBY Function

  • Hit ENTER.

Sort Alphabetically Keep Rows Together


Download Practice Workbook


Related Articles


<< Go Back to Sort in Excel | Learn Excel

Get FREE Advanced Excel Exercises with Solutions!
Shakil Ahmed
Shakil Ahmed

My name’s Shakil. My articles are targeted to support you in enriching knowledge regarding different features related to Microsoft Excel. I am fond of literature, hope some knowledge from them will help me providing you some engaging articles even though some weary technical terms.

We will be happy to hear your thoughts

Leave a reply

Advanced Excel Exercises with Solutions PDF

 

 

ExcelDemy
Logo