• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint

Sorting a Table

You can perform a simple table sort by sorting on the contents of a single column. You can also perform a more complicated sort by sorting on the contents of two columns. You cannot sort tables that contain merged cells. The following exercise demonstrates sorting.

In the biking_table.htm document, select the table and choose Commands > Sort Table.

The Sort Table dialog box opens.

All the default settings will work for this exercise. The first row in the table contains the column headers; you don't want to sort them. (Note that not including the first row is the default option, because the checkbox is initially unchecked.)

In the Sort By drop-down menu, select the first column to sort. Then, in the Order drop-down menu, select Alphabetically.

The Order menu specifies whether you want to sort the column alphabetically or numerically. This option is important when the contents of a column are numerical. An alphabetical sort applied to a list of one- and two-digit numbers results in an alphanumeric sort (such as 1, 10, 2, 20, 3, 30) rather than a straight numeric sort (such as 1, 2, 3, 10, 20, 30). Choose Ascending (A to Z, or low to high) or Descending for the sort order.

Leave the Then By drop-down blank. In the Order drop-down menu to the right, select Alphabetically.

Then By lets you choose to perform a secondary sort on a different column. The sort methods in the menu are the same as the methods that are available in Sort By.

For this exercise, leave the Sort Includes First Row option unchecked.

Choose this option to include the first row in the sort. If the first row is a heading that shouldn't be moved (as it is in this exercise), leave this checkbox unchecked.

For this exercise, leave the Keep TR Attributes with Sorted Row box unchecked.

If you changed any attributes for a row, you can retain that attribute in the row by choosing this option. Suppose that you sort a table with a color in the first row. After sorting, the data in the first row moves to the second row. If Keep TR Attributes with Sort Row is selected, the color moves with the data to the second row. If this option is not selected, the color remains in the first row.

Click Apply or OK.

Your table is sorted alphabetically by the first column, but the row headers remain in the first row.

  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint