How Do I Sort by Date in OpenOffice Calc?

Techwalla may earn compensation through affiliate links in this story. Learn more about our affiliate and product review process here.
The Sort command in OpenOffice Calc.
Image Credit: Image courtesy of the Apache Software Foundation.

The Sort command in OpenOffice Calc 4.1, found in the Data menu, enables you to sort the data in your spreadsheet based on its contents, either in ascending or descending order. For the command to work correctly when sorting dates, the cells containing the dates must be formatted as dates. This is unlikely to be an issue in the majority of cases, since OpenOffice Calc is designed to identify an entry typed as a date in a cell and automatically apply the correct formatting.

Advertisement

If the cells were formatted as text before you typed the dates in, however, the command sorts them in alphabetical rather than chronological order. To solve this, select the cells, right-click, select Format Cells, change the category to Date and click OK. Depending on how the dates were originally entered, you may also need to further alter each cell. For example, OpenOffice Calc automatically adds an apostrophe as the first character to cells that are formatted as text but begin with a number, to force them to display properly; you will need to remove this apostrophe from each cell for the sorting to work correctly.

Video of the Day

Video of the Day

Step 1

Selecting the range of cells.
Image Credit: Image courtesy of the Apache Software Foundation.

Select the entire range of cells you want to sort.

Advertisement

Step 2

The Sort command in the Data menu.
Image Credit: Image courtesy of the Apache Software Foundation.

Click Data and select Sort.

Advertisement

Step 3

The Sort dialog window, with the relevant options highlighted.
Image Credit: Image courtesy of the Apache Software Foundation.

Select the column that contains the dates from the first drop-down menu and then select either the Ascending or Descending radio button, depending on whether you want to sort with the earliest date at the bottom or at the top.

Advertisement

Step 4

The Sort dialog window, with the OK button highlighted.
Image Credit: Image courtesy of the Apache Software Foundation.

Select a second and third column to sort by, if necessary, and then click OK.

Advertisement

Advertisement