Professional Documents
Culture Documents
Sorting Functions
of MS Excel
Submitted by:
Genierose F. Yanto
BSN 2A
Sorting data is considered to be one of the most essential components of data
analysis as it helps in organizing or arranging the data in a specified desirable order and
aids the procedure of formatting and visualizing data. You might want to arrange a list of
values alphabetically, compile a list of product values from highest to lowest, or order
rows by their corresponding icons or colors.
Sorting data in Excel helps the user to understand and visualize data more effectively,
facilitates investigation of data, aids the process of searching, organizing and formatting
data and ultimately, helps in making efficient decisions. You can sort data by text (A to Z
or Z to A), numbers (smallest to largest or largest to smallest), and dates and times
(oldest to newest and newest to oldest) in one or more columns. You can also sort
using a custom list you create (such as A, C, and B) or by the format of cells which can
be done on the basis of cell color, font color, or cell icon.
To format all the selected data in a particular column as text, press Ctrl+1
simultaneously on the keyboard that will launch the Format Cells dialog, click on the
Number tab and then, under Category section, click on General, Number, or Text.
Remove any leading spaces: In some cases, when data is imported or copied from any
another application, the data values might have some leading spaces, which can
produce undesirable sorting results, when the operation is applied. Thus, all the leading
spaces need to be removed before sorting data. This can be done manually or using
TRIM function.
Note: Check that all the data to be sorted in the specified column contains values that
are numerical. If the result is not desired, the column might contain values which are not
numbers and are treated as text by the software. In that case, the data needs to be
changed into numbers by pressing Ctrl+1 simultaneously on the keyboard that will
launch the Format Cells dialog, clicking on the Number tab and then, under Category
section, clicking on Number. Leading spaces in the data values imported or copied also
need to be removed manually, which can be achieved manually or by using TRIM
function.
Note: Check that all the data to be sorted in the specified column contains values that
are either date or time. If the result is not desired, the column might contain values
which are not stored as date and time but are treated as numbers or text by the
software. In that case, the data needs to be changed into the date or time serial values.
Leading spaces in the data values imported or copied also need to be removed
manually, which can be achieved manually or by using TRIM function.
If you want to sort the values in the column by days of the week, format the cells in a
manner to display the day of the week and convert them to text by using the TEXT
function and perform the sorting operation accordingly.
For example, in the spreadsheet Society Work, if the sorting is initially applied onto the
alphabetic nature of the Departments employees are selected for, further sorting may
be applied onto the column of Name, to make the arrangement ordered. In order to
achieve best results of sorting in a spreadsheet, the range of cells on which sorting is
applied should have column headings to make the arrangement highly ordered which
can lead to a proper analysis of data and effective decision making.
Select any cell within the data range wherein sorting needs to be applied.
Click on the Data Tab on Menu Bar, and further click on Sort under Sort & Filter
group.
Sort dialog box opens up. Select the first column of priority which needs to be
sorted under Column, in the Sort dialog box.
Under Sort On List, select the type of sort that needs to be applied. Anyone of
the following options can be selected:
Select Values to sort by value of text, number or date and time.
Select Cell Color, Font Color or Cell Icon to sort by the format applied on the
column cells.
Under Order list, select the way of sorting. Anyone of the following options can
be selected:
For sorting text values, select A to Z or Z to A accordingly.
For sorting numerical values, select Smallest to Largest or Largest to Smallest
accordingly.
For sorting date or time values, select Oldest to Newest or Newest to Oldest
accordingly.
For sorting based on a custom list, select Custom List.
Optional: Click on Add level button in the Sort dialog box to add another column
to sort by and repeat the steps three to five to sort effectively.
Optional: Select the entry and click on Copy Level button in the Sort dialog box to
copy a column/field to sort by.
Optional: Select the entry and click on Delete Level button in the Sort dialog box
to delete a column/field to sort by.
Optional: To change the order in which the columns or fields in the spreadsheet
need to be sorted, select an entry of the Column Name and then click on the Up
or Down arrow button, next to the Options button to change the order of sorting,
provided entries higher in the list would be sorted before entries which appear
lower in the list.
Click on OK.
Sorted spreadsheet will be obtained.
Note: One entry for sorting the spreadsheet is essential in the dialog box.
The following procedure needs to be performed to sort cells by cell color, font color or
icon in Excel:
Optional: Select the entry and click on Copy Level button in the Sort dialog box to copy
a column/field to sort by.
Optional: Select the entry and click on Delete Level button in the Sort dialog box to
delete a column/field to sort by.
Optional: To change the order in which the columns or fields in the spreadsheet need to
be sorted, select an entry of the Column Name and then click on the Up or Down arrow
button, next to the Options button to change the order of sorting, provided entries higher
in the list would be sorted before entries which appear lower in the list.
Click on OK.
Sorted Spreadsheet will be obtained.
For example, consider a list defined by A, B and C group of employees, wherein the
user-defined order wants to sort list A, C and B in the order of employees. This problem
is compounded by the issue of not being able to sort employees on the basis of their
alphabetical nature, as this order is neither ascending alphabet nor descending
alphabet. Creating a user defined list, also known as a custom list, is a way to solve the
problem and achieve the desired sorted spreadsheet.
The following steps need to be performed in order to create the custom list and perform
sorting: