July 19, 2026

How to Sort Data in Excel by Column, Date, and Custom Order

Convert a PDF to Excel right here, no sign-up to try:

Drop your PDF here or click to browse

PDF files up to 50MB

Uploading...

First file free. Files are deleted after processing.

Last updated July 2026. To sort data in Excel, click any cell in the column you want to order, go to the Data tab, and click A to Z for ascending or Z to A for descending. Excel keeps each row together and reorders the whole list by that column. For more control, click Sort to open the Sort dialog, where you can add levels to sort by several columns, sort by date, or build a custom order. Sorting is how you take a converted list of transactions and put the largest deposits, the oldest invoices, or the newest dates right where you can see them.

Once a PDF becomes a spreadsheet you usually have one long, unordered list. The value comes from arranging it: biggest amounts first to spot outliers, oldest dates first to check a cutoff, or grouped by category to total each one. Excel sorts in place and, done correctly, moves every column of a row together so nothing gets scrambled. This guide covers a single-column sort, sorting by several columns, sorting dates, custom orders, and the mistakes that scramble data or make a sort refuse to run.

How do I sort data in Excel?

Click one cell in the column you want to sort by, then on the Data tab click the A to Z button to sort ascending or Z to A to sort descending. Do not select just the one column first; clicking a single cell lets Excel detect the whole table and move each row as a unit. Text sorts alphabetically, numbers sort by value, and dates sort chronologically. To sort the largest amounts to the top of a converted statement, click a cell in the amount column and choose Z to A.

Excel treats the top row as headers automatically when it can tell they are labels, so your header row stays put. If it does not detect them, open the full Sort dialog from the Data tab and tick My data has headers. That single checkbox is what keeps your Date, Description, and Amount titles from being sorted down into the data.

How do I sort by multiple columns?

On the Data tab, click Sort to open the Sort dialog, choose your first column under Sort by, then click Add Level and choose the next column. Excel sorts by the first level, and within any ties it sorts by the second level, and so on. To organize a transaction list by category and then by amount inside each category, set the first level to Category (A to Z) and the second level to Amount (Largest to Smallest). Every fuel charge groups together, sorted from biggest to smallest, then every meal, and so on.

Order the levels from most important to least important, because the top level drives the overall arrangement and each level below it only breaks ties. If you use the quick A to Z buttons instead of the dialog for a multi-column sort, work from the least important column to the most important, sorting the bottom priority first and the top priority last, since each sort preserves the previous order within ties.

GoalHow
Largest amounts on topCell in amount column, Z to A
Oldest dates firstCell in date column, A to Z (Oldest to Newest)
Category, then amountSort dialog, two levels
Your own order (Jan, Feb, ...)Sort dialog, Custom List
Keep headers in placeTick My data has headers

How do I sort without mixing up the rows?

Let Excel sort the whole table, not a single column in isolation. The classic disaster is selecting just the amount column, sorting it, and clicking Continue with the current selection when Excel warns you: the amounts reorder but the dates and descriptions stay put, so every row now pairs the wrong amount with the wrong date. When Excel shows the Sort Warning, choose Expand the selection so it moves entire rows together.

The safe habit is to click one cell inside the data and let Excel find the edges, rather than highlighting a column. Also make sure there are no fully blank rows inside the list, because a blank row splits your data and Excel will sort only the block above it. A converted PDF sometimes brings in blank rows at page breaks, so clear those first. If you want to be able to undo a sort later, add a plain numbered column (1, 2, 3) before sorting, so you can always sort by it to restore the original order.

How do I sort by date in Excel?

Click a cell in the date column and use A to Z for oldest to newest or Z to A for newest to oldest; in the Sort dialog the same choice reads as Oldest to Newest. This only works when Excel recognizes the column as real dates. The tell is alignment: real dates sit on the right of the cell by default, while dates stored as text sit on the left and will sort alphabetically, which puts every date that starts with 1 together regardless of year.

Dates that come out of a PDF as text are the usual reason a date sort looks wrong. Convert them to real dates first, then sort. If January, February, and March are text labels rather than dates, a plain sort puts them in alphabetical order (April, August, December), which is almost never what you want; the fix is a custom list, covered next. For the full walkthrough on repairing text dates, see how to change the date format in Excel.

How do I sort in a custom order?

Open the Sort dialog, choose your column, and under Order pick Custom List. Excel already includes month and weekday lists, so you can order data Jan, Feb, Mar or Mon, Tue, Wed instead of alphabetically. To sort by your own sequence, such as a priority of High, Medium, Low or a set of regions, choose Custom List, click New List, type the values in the order you want, and Excel remembers it. From then on that column sorts into your sequence rather than A to Z.

Custom sorts are handy after a conversion when a status or category column has a natural order that is not alphabetical. An aging report, for instance, reads better as Current, 1 to 30, 31 to 60, 61 to 90, Over 90 than in alphabetical order. Sorting an aging by the oldest, largest balances is also the first step toward acting on it, whether you follow up by phone or with a service that will chase every overdue invoice automatically.

Why is my Excel sort not working?

Three things cause most bad sorts. Numbers stored as text sort like words, so 1000 lands before 9 because Excel compares the first character; converting the column to real numbers fixes it. Text dates sort alphabetically instead of chronologically, for the same reason. And a blank row or column inside the range makes Excel sort only part of the list. Each of these traces back to how clean the data is when it arrives.

Leading or trailing spaces also throw a sort off, pushing entries with a stray space out of their expected place, and merged cells will block a sort entirely with a message that all merged cells must be the same size. Unmerge them and try again. Because every one of these problems starts with the quality of the import, the reliable fix is to convert cleanly in the first place: the PDF to Excel converter keeps amounts numeric and dates as real dates, and the bank statement converter does the same for statements, so your sorts land right the first time. When a sort still looks off, pair it with a quick filter on the same data to isolate the rows that are out of place.

Stop retyping PDF tables by hand

Upload a PDF and get a clean, editable Excel file in seconds. First conversion is free, no credit card required.