Usually we think about Excel saving us time by performing lengthy or repetitive calculations for us. But sorting is another great time saving feature. It can do simple sorting with just two clicks or more complex multilevel sorting with an easy to use tool. You can sort your whole worksheet or just selected cells.

In the simplest settings, you only need to click on a cell in the column by which you want to sort your data, then click the Sort & Filter button on the Home ribbon and choose which direction you want to sort. If you are in a column of text your options will be Sort A to Z and Sort Z to A. In a numeric column they will read Sort Smallest To Largest and Sort Largest To Smallest. For dates it becomes Sort Oldest To Newest and Sort Newest To Oldest.

When you choose your sort option, Excel will do its best to figure out what area you want sorted. If there are no empty columns or rows in your data, it usually gets it right and sorts all of your data. However, certain situations can confuse Excel and cause it to sort only part of your data leaving you with mismatched data in each row. So I prefer to always select the sort area myself before clicking the Sort button. You can highlight the exact cells in your table of data, but it is usually faster to use the column or row headings to select all of your columns (or all of your rows).

It doesn’t matter if you select by rows or by columns, as long as all of your data is included in what you select. Just use whichever is easier. If you have more columns or more rows than will fit on screen, remember that it is easier to start selecting from the end and go back to the beginning because you don’t have to worry about scrolling too far. Or use these keyboard shortcuts for the fastest and easiest method. Use CTRL+END to jump to the last cell of your worksheet. Then click on the heading for the last row or last column (either will work) and then use CTRL+SHIFT+HOME to select everything from there to the first row/column.

You may have already realized that once you have highlighted all of your data, you can’t put your cursor in the column you want to sort by without losing your selection. Custom sorting solves that problem. Click the Sort & Filter button, and choose Custom Sort. Or choose the Sort button from the Data tab of the ribbon.  Another window will open. If you have a row of column headings at the top of your data, make sure the My Data Has Headers box is checked.Open the Sort By drop down list and choose the column you want as your primary sort. Leave Sort On set to Values and choose your sort order in the last column. In the custom sort you aren’t limited to sorting by one column. You can click the Add Level button at the top of the window to choose how you want to sort within your primary sort. Keep adding as many levels as you need. For example you might want a sales report sorted first by customer, and by invoice number within each customer, and finally by item ID within each invoice. Click OK to apply your sort criteria.