Excel Tip: Sort Excel Data List by Four Criteria

The Excel sort feature allows you to sort a list by three criteria. But what if you want to sort your list using four features? Here's a tip that will show you how to accomplish this task.

For example, say you want to sort a data list that contains first and last names of employees, office locations, job descriptions, departments, month in which they were hired, and length of service. You are organizing an appreciation ceremony for all of the people in each office of the firm who have an anniversary in July.

You want to create a list of these people, organized primarily by month of hire, then by office location, department, and finally sorted by length of service. There are four criteria by which you want to sort, but the Excel Sort feature only allows a three-way sort.

Before you begin, examine the list. To perform a sort operation, your list should contain information in contiguous cells. If there are blank rows in your list they will sorted out of the list. Go ahed and remove any blank rows. Also, there should be no more than one row of header information at the top of your list.

To perform a four-criteria search, you need to start by sorting the second, third, and fourth criteria.

1. Click once anywhere in your list.

2. Choose Data, Sort from the menu. The Sort window will appear.

3. Choose "Office location" for your first criterion. Choose "Department" for your second criterion, and choose "Length of service" for the third criterion. (If there is a header row in your worksheet, make sure the "Header row" option is checked.) Click the OK button to perform the sort.

The resulting list will be alphabetized by office location, then within each office location there will be an alphabetical sort by department, then the results from each department will be sorted by seniority (length of service).

4. Now, to achieve your desired results, click anywhere in the list and choose Data, Sort. This time, select "Month of hire" as your first sort criterion. Delete any information that appears in the second and third sort criteria boxes, then click the OK button to perform the sort.

The result will be a list, sorted by month, within each month the records are sorted by location, within each location they are sorted by department, and within each department they are sorted by length of service.

You may like these other stories...

Earlier this week I presented the Chart Edition of AccountingWEB’s High Impact Excel webinar series. One of the many topics I covered was the Sparklines feature, which was first introduced in Excel 2010. Several...
On January 30, I led a free, one-hour webinar, High Impact Excel: Pivot Table Edition. If you missed the presentation, it’s too late to get CPE credit, but you can watch an on-demand recording. After the webinar, I...
By David Ringstrom, CPA In Part 1 of this series I showed how to use a custom number format to conditionally display decimal places. Although the technique is simple, the downside is it may not work in every situation....

Upcoming CPE Webinars

Jul 31
In this session Excel expert David Ringstrom helps beginners get up to speed in Microsoft Excel. However, even experienced Excel users will learn some new tricks, particularly when David discusses under-utilized aspects of Excel.
Aug 5
This webcast will focus on accounting and disclosure policies for various types of consolidations and business combinations.
Aug 20
In this session we'll review best practices for how to generate interest in your firm’s services.