To order numbers numerically in Excel, select your data, go to the Data tab, click Sort, choose the column containing your numbers, and set Order to Smallest to Largest (or Largest to Smallest). This sorts values by their true numeric value, so 2 comes before 10. If your numbers are stored as text, convert them to numbers first, otherwise the sort will treat them alphabetically.
What You'll Need
- Microsoft Excel (any recent version for Windows, Mac, or Excel for the web). The steps below use the desktop ribbon; labels may differ slightly by version, device, or region.
- A worksheet containing the numbers you want to sort, ideally with a header row so Excel can detect column names.
- Basic familiarity with selecting cells and ranges.
Step-by-Step
- Select your data range. Click any cell inside the list, or drag to highlight the entire range including headers. If your data has adjacent columns, select all of them so rows stay together when sorted.
- Open the Sort dialog. Go to the Data tab and click Sort (in the Sort & Filter group). The Sort dialog gives you precise control over which column is sorted and how.
- Tell Excel your data has headers. In the Sort dialog, tick My data has headers if your first row contains column names. This prevents the header from being sorted as data.
- Choose the column to sort by. Under Column, pick the column that contains your numbers (for example, "Amount" or "Quantity"). If you selected only one column, Excel may ask whether to expand the selection; choose Expand the selection to keep rows intact.
- Set Sort On to Values. Under Sort On, select Values. This ensures Excel sorts by the actual number, not by cell color, font color, or icon.
- Set Order to Smallest to Largest or Largest to Smallest. Under Order, choose Smallest to Largest for ascending order (1, 2, 3…) or Largest to Smallest for descending (10, 9, 8…). Click OK.
- Verify the result. Check that the numbers are in the expected sequence and that adjacent data (names, dates, descriptions) moved with them. If rows look mismatched, undo with Ctrl+Z (Cmd+Z on Mac) and redo the sort with the full range selected.
- For a quick sort, use the A→Z or Z→A buttons. Select a single cell in the numeric column and click Sort A to Z (ascending) or Sort Z to A (descending) on the Data tab. Excel will sort the entire contiguous range and may prompt about expanding the selection.
Common Mistakes
- Sorting only one column. If you highlight just the numbers and sort, Excel may rearrange only that column, breaking the link between each number and its row. Always select the whole table or choose Expand the selection.
- Numbers stored as text. Text-formatted numbers sort alphabetically: 1, 10, 2, 20. Look for a green triangle in the cell corner or left-aligned numbers. Convert them to real numbers before sorting (see Troubleshooting).
- Forgetting the header row. If "My data has headers" is unticked, the header text gets sorted into the data, usually appearing at the bottom or top as an odd entry.
- Hidden rows or filtered data. Sorting a filtered list can produce unexpected results. Clear filters first (Data > Clear) and unhide rows so the full dataset is sorted.
- Mixed data types in one column. A column containing both numbers and text (like "N/A") may sort inconsistently. Clean or separate the data before sorting.
Tips
- Use Custom Sort (Data > Sort) to sort by multiple levels, for example by Category first and then by Amount numerically.
- Convert your range to an Excel Table (Ctrl+T) so sorts and filters apply automatically to new rows.
- Before sorting a large or important sheet, save a copy or use Undo (Ctrl+Z) if something goes wrong.
- To sort numbers with leading zeros (like ZIP codes), format the column as Text first, but note that text sorting is alphabetical, not numeric.
- Use Sort Left to Right in the Sort dialog options if your numbers run across columns instead of down rows.
Troubleshooting
- Numbers sort as text (1, 10, 2). Select the column, go to the Data tab, and use Text to Columns with the Delimited option and no delimiters, then finish. Alternatively, multiply the cells by 1 using Paste Special, or format the cells as Number. This converts text-stored numbers to real numbers.
- Rows become misaligned after sorting. Undo immediately (Ctrl+Z). Then select the entire table (including all related columns) before sorting, or use Expand the selection when prompted.
- The sort order looks wrong despite numeric values. Check for hidden rows, filters, or a secondary sort level. Open the Sort dialog and remove any extra levels under Sort By.
- Excel warns "Sort and Filter" or "The cell you are trying to change is in a protected sheet." Unprotect the sheet via Review > Unprotect Sheet, or ask the sheet owner. Sorting cannot run on protected sheets.
- Only part of the data sorts. Make sure the range is contiguous (no blank rows or columns splitting the table). Select the full block manually if needed.
- Sort buttons are greyed out. This can happen if the workbook is shared, protected, or in a mode that restricts editing. Check the Review tab and the workbook's sharing settings.
Frequently Asked Questions
Why does Excel sort 10 before 2?
Because those cells are formatted as text, not numbers. Excel then sorts character by character, so "10" comes before "2". Convert the column to Number format or use Text to Columns to fix it.
Can I sort numbers without affecting the rest of the row?
No—sorting a single column in a table will rearrange only that column unless you expand the selection. To keep rows intact, always sort the entire table.
How do I sort a column that contains both positive and negative numbers?
Excel handles negatives correctly in a numeric sort: Smallest to Largest places the most negative first, then zero, then positives. Ensure the cells are true numbers, not text.
Does sorting work the same in Excel for the web and on Mac?
The core Sort dialog and A→Z buttons are available across Excel for Windows, Mac, and the web, but menu labels and ribbon layout can differ slightly by version and region. The numeric sorting logic is the same.
What if my numbers have currency symbols or commas?
Excel usually recognizes these as numbers if the cell is formatted as Currency or Accounting. If sorting misbehaves, check the cell format and remove any stray spaces or non-breaking characters.
Can I sort by a custom list of numbers?
Yes. In the Sort dialog, under Order, choose Custom List and enter your sequence. This is useful for things like priority codes (High, Medium, Low) rather than pure numeric order.