Excel Tip: Sort Excel Data List by Four Criteria
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.