Office 2010 - Excel

Lesson 26: Database functions (1)

26/87 Lessons 

Sort

I had already told you in Lesson 1 that in “Excel” we have a number of database functions.

For those not accustomed to working with databases, a database is a collection of data. This data is stored as records and records consist of fields.

An example will make this clearer:

A record can be your name, your address, your postal code and where you live. All this data together is called a record.

One piece of this data, such as your name, is called a field.

“Excel” considers each row as a “record”, and each column as a “field”.

Continuing….

An important database feature available to us in Excel is sorting of data.

You have the ability to “Sort” on a column or “field” for database specialists among us. You can also “Sort” multiple columns.

“Sort” a column in two clicks.
You place the cursor in the column you want to “Sort”, click the “Sort and Filter” button in the “Ribbon” under the “Home” tab, then choose “Sort A to Z” or “Sort Z to A”. Depending on whether you want to “Sort” descending or ascending.

Sorting on multiple columns

To “Sort” on multiple columns, position the cursor in any column which contains a value. Click the “Sort and Filter” button in the “Ribbon” and choose “Custom Sort” in the drop-down menu.

The “Sort” dialog box opens. In the “Sort” dialog box, you will be asked which column you want to sort by. In this case, I want to “Sort” by “Region”. But I also want to sort by “Name”. For this I need to click the “Add Level” button. This adds a new box to the list, where I can choose the “Name” column. If you want to use multiple columns in your sort, click the “Add Level” button again.
In the 2010 version of “Excel” you can add as many levels as you want. If you want to change the order of the sorting, select the field, and click the up or down arrow.

The second box “Sort by” allows us to choose the type of “Sort”. Select “Values” if you want to “Sort” text, numbers, dates, and time. If you want to format the “Sort”, you can choose one of the other options: “Cell Color”, “Font Color”, or “Cell Icon.”

In the third section, we choose the “Sort” order. Here we have different choices depending on the data in the field that you have chosen. If this is text, you can “Sort” “A to Z” “Z to A” and “Custom List”. If the choosen field/column contains numbers, you can “Sort” from “Smallest to largest”, ” Largest to smallest”, and again “Custom List”. If it is a date or time, you can “Sort” by ” Old to New “or” New to old “, and also ” Custom List “.

If you wish to copy a “sorting level”, you can click the “Copy Level” button at the top of the dialog. If you wish to remove a level, select the level and click the “Delete Level” button at the top of the dialog.

Important!

If your list has, as in this case, column titles, select the check box “My data has headers”. Otherwise, the “column titles” will also be incorporated into the “Sort” as in below example. And I don’t think this is our intention.

Awesome!
You've completed Lesson 26
START NEXT LESSON