Sorting in Excel is often tricky when you have more than one header row above your data. In most cases, especially when you're working with numerical data, Excel automatically detects the correct header row -- but you may run into problems when you sort data that includes text. If you just plan to sort your data one time, the simplest solution is to manually select your sort range; but if you need to sort the spreadsheet on a regular basis, use the filter feature to permanently define the sorting range.

Manual Selection

Step 1

Highlight the entire range of cells you want to sort, including the last header row. Leave out the extra rows at the top.

Step 2

Click "Sort & Filter" on the Home tab, and then select "Custom Sort."

Step 3

Check the box next to "My Data Had Headers," select the column or columns by which you want to sort, and then click "OK."

Use Filter to Define Sort Area

Step 1

Highlight the bottom header row. You can select just the cells in the row, or select the entire row.

Step 2

Click "Sort & Filter" on the Home tab, then select "Filter." Excel adds filter arrows to all the column names.

Step 3

Click an arrow and select a sorting option to sort the entire table by that column.

Step 4

Click "Sort & Filter" and select "Filter" again if you want to get rid of the arrows, but keep the sorting area defined by the filter. After the arrows are gone, you can sort normally; Excel ignores the extra header rows.