To arrange data in Excel, the fastest reliable route is to format your range as a table (or select the whole contiguous block with no blank rows or columns), then use the Data tab's Sort and Filter commands to order rows by one or more columns. That keeps whole records together instead of shuffling single cells. If "arrange" for you means laying out the sheet itself — narrowing columns, wrapping text, freezing headers so they stay visible — those are the Home tab's alignment and format tools. Menu labels can differ slightly by Excel version, platform (Windows, Mac, web) and region, so look for the closest match.

What You'll Need

  • A spreadsheet open in Excel on Windows, Mac, or Excel for the web. The commands below exist in all three, though ribbon placement differs a little.
  • Data in a clean grid: one header row at the top, one record per row, one type of information per column.
  • If you plan to sort or filter, there must be no completely blank rows or columns inside the block — Excel stops at a blank line and silently leaves the rest unsorted.
  • A backup copy if the data is important. Sorting and deleting are easy to undo immediately with Ctrl+Z (Cmd+Z on Mac), but harder to repair days later.

Step-by-Step

  1. Put the sheet in order (structure first). Before touching any sort button, make sure row 1 holds your column headings and nothing else. Delete any title banner that spans across columns, or move it above the table later. A single merged title cell above your headings is the most common reason sorting goes wrong.
  2. Remove blank rows and columns. Select the range and press Ctrl+- (Control+minus) to delete fully empty rows, or just scroll through and delete them manually. Inside a table this matters less, but in a plain range a blank row splits the data into two blocks and only the top block gets sorted.
  3. Select your data. Click any single cell inside the block, then press Ctrl+A (Cmd+A on Mac) — or, more safely, use the Name Box at the top-left and type the range, for example A1:F200, then press Enter. Selecting a single block tells Excel to treat all rows together.
  4. Convert it to a table (recommended). With a cell selected, go to Insert > Table, confirm the range and that "My table has headers" is ticked, and click OK. Tables automatically extend when you add rows, and sorting and filtering stay consistent. On the Table Design tab you can rename the table in the Table Name box if you plan to reference it.
  5. Open the sort dialog. Go to the Data tab and click Sort (not Sort A to Z, which is a one-click shortcut). The Sort dialog lets you set multiple levels, which you will need for anything beyond a single column.
  6. Check the header setting. In the Sort dialog, make sure "My data has headers" is ticked. This stops Excel from sorting your heading row down into the data as if it were a record. If your headings disappear from the list of column names, this box is the culprit.
  7. Set the first sort level. Under "Sort by", choose the column — for example Department — then "Sort On" (Cell Values is correct for text and numbers), then "Order" (A to Z, Z to A, or a custom list). Click Add Level to stack a second criterion, such as sorting by Amount Largest to Smallest within each Department.
  8. Apply and verify. Click OK, then look at a couple of rows you know well. Confirm the whole record moved together — a name still beside the right phone number. If values look scrambled across columns, undo at once with Ctrl+Z and check step 6.
  9. Filter rather than delete. On the Data tab click Filter (tables get filter arrows automatically). Use the arrow on a column to hide rows that do not match. Filtering lets you view one region or category without destroying the rest of the dataset.
  10. Tidy the layout. Select all columns (click the corner box or press Ctrl+A twice), then on the Home tab use Format > AutoFit Column Width and Wrap Text so long entries stay readable. Wrap Text makes rows taller, so follow it with Format > AutoFit Row Height.
  11. Freeze the header row. Put your cursor in cell A2, then go to View > Freeze Panes > Freeze Top Row on Windows, or View > Freeze Panes on Mac. The headings stay put while you scroll, which makes a long arranged sheet far easier to read.
  12. Add totals the safe way. If you want a summary row, put it in a separate area rather than as a literal row inside your data, because any totals row inside the block will be shuffled by sorting. In a table, tick Total Row on the Table Design tab — Excel keeps it pinned to the bottom automatically.

Common Mistakes

  • Sorting a single column. Selecting just column B and clicking Sort A to Z rearranges only that column and detaches it from the rest of the row. Always select the whole block or, better, use a table.
  • Merged cells in the data. Merged cells inside a table area break sorting and filtering. Unmerge them (Home > Merge & Center) and repeat values in each row instead.
  • Numbers stored as text. If sorting puts "10" before "9" or shows a green triangle in the corner, the values are text. Convert with Data > Text to Columns > Finish on the selected column, or use the error-check dropdown to convert to number.
  • Leading or trailing spaces. These make identical-looking entries sort into separate groups. Use Find and Replace (Ctrl+H) with a space in "Find what" to strip stray spaces, or the TRIM function in a helper column.
  • Forgetting that hidden rows stay hidden. Filtering hides data; if you copy and paste a filtered range, you can miss rows. Copy the visible data deliberately and check the row count.

Tips

  • To sort into a sequence Excel does not know — say Low, Medium, High — use Sort > Order > Custom List and type your own order.
  • Use colour sorting on the Data tab's sort options if you have manually highlighted rows you want grouped.
  • Sort before you add formulas that reference rows; formulas with relative references can point at the wrong row after a re-sort.
  • Keep one dataset per sheet where you can. Two unrelated blocks on one sheet make selecting and sorting unpredictable.
  • When sharing, leave the sheet as a table with filters cleared so the next person sees the full dataset.

Troubleshooting

If the sort did nothing, or only part of the sheet moved, the most likely causes are a blank row splitting the range, a selection that was not contiguous, or "My data has headers" being wrongly ticked or unticked. Undo, reselect the entire block, reopen the Sort dialog, and check that box. If your headings vanished into the data, the header setting was off — undo and re-sort.

If Excel refuses to sort and shows a message about merged cells or protected sheets, unmerge the cells or unprotect the sheet via Review > Unprotect Sheet (you will need the password if one was set). If a pivot table started from your data, sorting it separately in the source and refreshing can shift column widths and layout — refresh the pivot table and reapply your preferences.

If filter arrows are missing, click a cell in the data and confirm Filter is switched on for that range; tables have them built in. If the file behaves oddly after all of this, save a copy, close and reopen Excel, and check for available updates, since ribbon commands and dialog behaviour can vary between versions.

Frequently Asked Questions

Does sorting in Excel keep rows together?

Yes, if you sort a whole contiguous range or a table. Select a single column and Excel only rearranges that column, which is why selecting the full block matters.

How do I sort by two columns at once?

Open Data > Sort, set your first column and order, then click Add Level and set the second. The second level only applies within groups of equal values in the first.

Can I undo an arrangement I do not like?

Press Ctrl+Z (Cmd+Z on Mac) immediately. Several levels of undo are available in a session, but once you close the file without saving, the previous order is lost.

Why do my numbers sort as 1, 10, 2?

They are stored as text. Convert the column to numbers using Text to Columns or the error-check option, then sort again.

Is arranging data the same as formatting it?

No. Arranging changes the order of rows or hides them with filters; formatting changes how they look. Use Data tools to arrange and Home tools to make it readable.