0% found this document useful (0 votes)
49 views3 pages

L2 Sorting

This document discusses various ways to sort data in Excel, including: 1. Sorting sales transaction data by salesperson, product, units sold, and date from oldest to most recent. 2. Sorting data based on cell or font color. 3. Sorting months of the year in chronological order from January to December. 4. Sorting data without using the Sort dialog box by clicking Sort A to Z or Sort Z to A. The document also provides examples of sorting data by icon, day of the week, and font color.

Uploaded by

Karthi Keyan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
0% found this document useful (0 votes)
49 views3 pages

L2 Sorting

This document discusses various ways to sort data in Excel, including: 1. Sorting sales transaction data by salesperson, product, units sold, and date from oldest to most recent. 2. Sorting data based on cell or font color. 3. Sorting months of the year in chronological order from January to December. 4. Sorting data without using the Sort dialog box by clicking Sort A to Z or Sort Z to A. The document also provides examples of sorting data by icon, day of the week, and font color.

Uploaded by

Karthi Keyan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
You are on page 1/ 3

Lecture-2

Sorting in Excel
Questions answered
 How can I sort sales transaction data so that transactions are sorted first by salesperson, then
by product, then by units sold, and finally in chronological order from oldest to most recent?
 I have always wanted to sort my data based on cell color or font color. Is this possible in
Excel 2010?
 “Conditional Formatting.” -Can I sort my data based on the icon in the cell?
 My worksheet includes a column containing the month in which each sale occurred. When
I sort by this column, I get either April (first month alphabetically) or October (last month
alphabetically) on top. How can I sort by this column so that January transactions are on
top, followed by February, and so on?
 Can I sort data without using the Sort dialog box? Almost every user of Microsoft Excel has
at one time or another sorted columns of data alphabetically or by numerical value. Let’s
look at some examples of how wonderful and powerful sorting is in Excel 2010.

How can I sort sales transaction data so that transactions are sorted first by salesperson, then
by product, then by units sold, and finally in chronological order from oldest to most recent?

A small company sells makeup items. The Makeup worksheet in the Makeupsorttemp.xlsx file in
the Templates folder contains the following sales transaction information:
 Transaction number
 Name of salesperson
 Date of transaction
 Product sold
 Units sold
 Dollars received
 Location of transaction
I want to sort the data so that:
 Transactions are listed alphabetically by salesperson. I want to sort in the usual A-to-Z order
so that all of Ashley’s transactions are first and all of Zaret’s transactions are last.
 Each person’s transactions are sorted by product. Thus, Ashley’s eye liner transactions will
be followed by Ashley’s foundation transactions and so on.
 For each salesperson and product, transactions are listed by number of units sold (in
descending order).
 If a salesperson makes two or more sales of the same product for the same number of units,
transactions are listed in chronological order.
In versions of Excel before Excel 2007, it was difficult to sort on more than three criteria. Excel
2007 and Excel 2010 allow you to apply up to 64 criteria in one sort. To sort the sales data, I first
need to select the data (cell range E3:K1894). Two easy ways to select this data are as follows:
 Position the cursor in the upper-left corner of the data (cell E3), and then press
Ctrl+Shift+Right Arrow followed by Ctrl+Shift+Down Arrow.
 Position the cursor anywhere in the cell range and press Ctrl+Shift+*.
Next, on the Data tab, in the Sort & Filter group, I click Sort to display the Sort dialog box. Because
row 3 contains headings for the data columns, I select the My Data Has Headers check box. Now I
select the following four criteria in the order:
Page 1|3
1. Sort by the Name column so that values (this means cell contents) are in A-to-Z order.
2. Sort by the Product column so that values are in A-to-Z order.
3. Sort by the Units column so that values are in order from largest to smallest.
4. Sort by the Date column so that values are in chronological order from oldest to newest.

Note that all of Ashley’s transactions are listed first, with eye liner followed by foundation, and so
on. Eye liner transactions are listed from the largest number of units sold to the smallest. In the case
of a tie (see rows 6 and 7), the transactions are listed in chronological order. Using the Sort dialog
box, you can easily add sort criteria (Add Level), delete sort criteria (Delete Level), copy the settings
that define a level of the sort (Copy Level), or specify whether your data has headers. By selecting
Options, you can make the sort operation case sensitive or even sort data for which each data item
is listed in a different column (instead of the more common situation in which each case is in a
different row).

I have always wanted to sort my data based on cell color or font color. Is this possible in Excel
2010?

In Excel 2010, sorting on cell or font color is simple. Consider the Makeup worksheet in the
Makeupsorttemp.xlsx file. Several names in column F are highlighted in different colors. For
example, Cici in cell F620 is highlighted in red, and Colleen in cell F833 is highlighted in yellow.
Suppose you want names with green fill on top, followed by yellow, and then by red, with the rest
of the rows on the bottom. To sort the Name column by color, simply select the range you want to
sort (E3:K1894), click Sort, and click Add Level. After selecting the Name column, click the Sort
On setting, and select Cell Color (selecting Font Color sorts by font color).
For the first level, select green from the Order list, select yellow for the second level, and select red
for the third level. The resulting sort is shown in the Colors worksheet of the Makeupsort.xlsx file
found in the Practice Files folder.

“Conditional Formatting.” -Can I sort my data based on the icon in the cell?
To sort by icon, simply select Cell Icon from the Sort On list in the Sort dialog box. Then, in the
Order list, choose the icon you want on top for the first level and so on.

My worksheet includes a column containing the month in which each sale occurred. When I
sort by this column, I get either April (first month alphabetically) or October (last month
alphabetically) on top. How can I sort by this column so that January transactions are on top,
followed by February, and so on?

The Dates worksheet in the Makeupsorttemp.xlsx file contains a list of months. I would like to
sort the months so that they appear in chronological order beginning with January. I begin by
selecting the range D6:D15 and sorting column D by values.
When selecting the order, I select Custom List and then select the option beginning with January,
February, March. Note that you could also have sorted by the day of the week. The completed
dialog box is shown with the resulting sort. Note that in the Custom Lists dialog box you can create
a custom sort order list. Simply select New List, under List Entries type the entries in the order you
want to sort by, and then click Add. Your new list is now included as a menu selection. For example,
if you enter Jack, John, and Alan in List Entries (on different lines or separated by commas), all
entries with Jack would be listed first, followed by John listings, with Alan listings at the end.
Can I sort data without using the Sort dialog box?

Sometimes sorting data without using the Sort dialog box is more convenient. To illustrate how this
is done, suppose again that you want to sort the sales transaction data in the Makeup worksheet in
Page 2|3
the Makeupsort.xlsx file so that transactions are sorted first by salesperson, then by product, then
by units sold, and finally in chronological order from the oldest to the most recent. To begin, select
the least important column to sort on first, which is the date column (G3:G1894). Next, in the Sort
& Filter group on the Data tab, click the Sort A To Z button and, with the Expand The Selection
option selected, click Sort so that all the columns are sorted. The Sort A To Z button sorts numerical
data so that the smallest numbers or oldest dates are on top, and sorts text so that A precedes B and
so on.
The Sort Z To A button, of course, sorts numerical data so that the largest numbers or most recent
dates are on top, and sorts text data so that Z precedes Y. Next, sort by the second least important
column (Units) Z To A because you want larger sales on top. Then sort from A to Z by Product,
and finally from A to Z by salesperson. These steps achieve the same results

Problems
1. In the Makeupsort.xlsx file, sort the sales data alphabetically by location, then by product type,
then by name, then by date of sale, and finally by units sold.
2. The Sortday.xlsx file contains hours worked on different days of the week. Sort the data so that
Monday data is followed by Tuesday data and so on.
3. The Sorticons.xlsx file contains annual investment returns with an up arrow used to indicate
good years, a horizontal arrow used to indicate average years, and a red arrow used to indicate bad
years. Sort the data by the icons in the Stock column with up arrows on top, followed by horizontal
arrows, and then red arrows.
4. The file Makeupsortfont.xlsx contains our makeup data with certain dates shown in blue, red,
or brown font. Sort the data so that brown dates are on top, followed by red dates, and then blue
dates.

Page 3|3

You might also like