How to Sort an Excel Table by One Column Without Errors

Formulas & functions · Updated November 18, 2026

To sort an Excel table by one column, click the arrow in that column’s header and choose an ascending or descending sort, such as Sort A to Z or Sort Smallest to Largest. Excel keeps each row’s values together, so the other columns move with the value being sorted.

Sort a table using its column header

In Excel for Microsoft 365 on Windows, a formatted table normally has a filter arrow in each header cell. Use that arrow to sort by the column you want:

  1. Click the drop-down arrow in the table’s target column header.
  2. Choose the appropriate ascending or descending option. The wording depends on the data: text typically offers Sort A to Z and Sort Z to A; numbers offer smallest to largest or largest to smallest; dates offer oldest to newest or newest to oldest.
  3. Check the resulting rows to make sure the order matches what you intended.

For example, in a table with columns for Employee, Department, and Start Date, sorting the Start Date column from oldest to newest reorders complete employee records. It does not sort the dates independently of the names and departments.

You can also click inside the table and use the ribbon: choose Data, then select an ascending or descending sort command. For more control, choose Data > Sort to open the Sort dialog. In Excel for Mac and Excel for the web, the same basic approach applies, although ribbon placement or menu wording can vary slightly by version.

Why sorting an Excel table keeps rows together

An Excel table is a structured range of related records. Each row represents one record, and each column contains one kind of information about those records. When you sort a table column, Excel rearranges the table’s rows as units. That is why a customer name stays beside the correct order number and amount after sorting.

This is different from selecting a few cells in an ordinary worksheet range and sorting only those cells. If you sort a single column without including the related columns, the values can become detached from their original records. A table’s header controls and built-in structure help prevent that mistake.

If your data has not been made into a table, select a cell in the range and choose Insert > Table. Confirm that the selected range is right and that My table has headers is checked if the first row contains column names. You can also use Home > Format as Table. Avoid including unrelated notes or totals in the range: Excel will treat included rows as part of the table.

Choose the right sort order

Ascending and descending describe opposite directions, but the exact order depends on the kind of values in the column. For text, ascending is generally alphabetical; for numbers, it runs from the lowest to highest; and for dates, it runs from earliest to latest. Reverse the direction to put later dates, larger numbers, or text nearer the end of the alphabet first.

Before sorting, consider what the first and last entries should be. A list of delivery dates may be easier to review with the oldest date first, while a sales table may be more useful with the largest sale at the top. Sorting changes the displayed row order, not the underlying values or formulas.

  • Names or labels: Use A to Z to find entries alphabetically, or Z to A to reverse the order.
  • Amounts or counts: Use smallest to largest to locate low values, or largest to smallest to see the highest values first.
  • Dates: Use oldest to newest for a timeline, or newest to oldest to bring recent records to the top.

Blank cells can appear at one end of a sorted column, and their position may depend on the sort type and direction. If blanks are important, check the sorted results rather than assuming they will be placed exactly where you expect.

Use the Sort dialog for more control

The header arrow is the quickest option when you need to sort by just one field. The Sort dialog is useful when you want to confirm the column and sort settings explicitly. Click a cell in the table, then choose Data > Sort. In the dialog, select the column under Sort by, choose Cell Values under Sort On, and select an order.

Check the header setting in the dialog. If Excel recognizes the table headings, it should treat them as headers rather than sort them as ordinary data. In a typical table, the heading is excluded from the records being sorted. If the dialog offers a My data has headers option, make sure it reflects your range. Sorting a header as if it were a record can put the column name into the body of the table.

The dialog also supports multiple sort levels. For example, to group records by Department and then alphabetize employees within each department, set Department as the first level and Employee as the next. Excel applies the second level among records that have the same value in the first column. For a request to sort by only one column, a single level is enough.

Check the data before sorting

Excel sorts the values it recognizes, which may not always be the values you think you entered. A number stored as text can sort differently from a numeric value. For instance, text values such as “100” and “20” may be ordered alphabetically, putting “100” before “20,” rather than numerically. Dates stored as text can likewise fail to follow chronological order.

If the result looks wrong, inspect a few cells and check whether the entries share the same data type and format. A green error indicator may flag numbers stored as text; Excel may offer a convert-to-number option. For dates, check that the cells contain actual Excel dates rather than text strings. Be cautious when converting: leading zeros in codes such as postal codes or product IDs may be meaningful, so those values should often remain text.

Other inconsistencies can affect the order too. Extra spaces can make two labels that look identical behave as different text values. Mixed spellings, punctuation, or inconsistent date entry can also make a sort seem unexpected. Cleaning the source values first is often better than trying to compensate for inconsistent data through the sort options.

Common sorting problems and how to avoid them

  • Only one column moved: You may have sorted a worksheet range rather than a table, or chosen to continue with the current selection when Excel asked whether to expand it. Choose Expand the selection so related columns move with the sorted values. If the data is a proper table, sort from its header or click inside it before using the ribbon.
  • The header moved into the records: Review the header setting in Data > Sort and confirm that the first row is recognized as column headings.
  • The order seems illogical: Check for numbers or dates stored as text, blank cells, extra spaces, and inconsistent entries. Excel sorts the actual stored values, not just their visual appearance.
  • Some rows were not included: Check whether the table includes the full data range. If you added records next to, rather than inside, a table, those records may not be part of it. Resize the table or add the records to the table before sorting.
  • You sorted the wrong field: Use the Sort dialog to see the selected column name, or undo the sort and choose the correct header arrow.

Before sorting a large or important list, it can help to save the workbook or make a copy. You can usually reverse an accidental sort immediately with Undo, but later edits or other actions may make it harder to return to the earlier order. A dedicated ID column is also useful if you need a reliable way to restore an original sequence.

Sorting a table versus sorting a worksheet range

A formatted table is usually the safer choice for ongoing lists because its headers, filter controls, and expanding range make the records easier to manage. When new data is added directly below a table, Excel commonly extends the table to include it. Sorting from a table header then acts on the table’s records rather than an isolated column.

A normal range can also be sorted. Select a cell in the data and use a sort command; when Excel asks whether to expand the selection, include the full set of related columns. If the range has headings, ensure Excel treats them as headers. For a range with gaps or unrelated cells nearby, confirm the selection carefully before sorting so that records are not accidentally left out or included.

Sorting is not the same as filtering. Sorting changes the order of records; filtering hides records that do not meet a condition. A table can use both, so you might filter a Department column to show one team and sort the visible list by Start Date. Clear a filter separately if you want all records visible again.

Frequently Asked Questions

How do I sort one column without messing up the other columns?
Sort from the column header arrow in an Excel table, or select the full related range when sorting ordinary worksheet data. Excel should move each complete row together, keeping its values associated.

Can I sort an Excel table alphabetically?
Yes. Open the arrow in the text column’s header and choose Sort A to Z or Sort Z to A. The table’s rows will follow that alphabetical order.

Why does Excel sort numbers incorrectly?
Some values may be numbers stored as text, or the column may contain a mixture of text and numeric values. Check the cell contents and convert values only when doing so is appropriate for the data.

Can I sort by one column and then another?
Yes. Choose Data > Sort, set the primary column, and add another level for the tie-breaker column. The additional sort is applied among rows tied on the first column.

How do I restore the original order after sorting?
Use Undo immediately if the sort was your last action. For a dependable way to restore a source order later, keep a unique ID or original sequence column and sort by it when needed.

Related

Try it: the Formula Explainer: paste any formula and see each function and reference in plain English.

More in Formulas & functions

Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources

Spotted an error in this guide? Let us know.