How to Sort Times from Earliest to Latest Within Each Date in WPS Office Spreadsheets
Question details
The user needs to sort multiple event times chronologically within each date when dates and times are stored in adjacent spreadsheet columns.

- Product
- WPS Office Spreadsheets
- Device & OS
- not provided
- Scenario
- The user has a workbook with event dates in one column and event times in an adjacent column and wants to arrange each day's events from earliest to latest without mixing up the dates.
- Observed behavior
- The times within each date are not currently in chronological order, so the user needs a multi-level date-and-time sort.
Make sure the dates and times are in separate adjacent columns and are stored as spreadsheet-recognized date/time values rather than text. Otherwise, sorting may not work correctly.
Sort by Date and Time with the Sort Command in WPS Office Spreadsheets
Use this method in WPS Office Spreadsheets or Excel when you need a one-time manual sort of dates and their adjacent times.
This method changes the row order in place. Select all the columns that must move together so the date and time values stay aligned.
Select the entire data range including the date column, the time column, and any related event columns.
Go to the Data tab and click Sort > Custom Sort in WPS Office Spreadsheets.
In the Sort dialog, add the first level, choose the Date column, set Sort On to Values, and set Order to Oldest to Newest or Ascending.
Add a second level, choose the adjacent Time column, and set Order to Ascending or Smallest to Largest.
Click OK. The rows are now sorted by date first and by time from earliest to latest within each date.

Sort Dynamically with SORT or SORTBY in Microsoft 365 or Excel 2021
Use a dynamic array formula when you want a live sorted result that updates automatically from the source data.
Use a Helper Column if You Need a Manual Sort in Older Excel Versions
If you cannot use a multi-level sort or dynamic arrays, create a combined date-time value in a helper column and sort on it.
Sort Event Times Chronologically by Date in WPS Office Spreadsheets
WPS Office Spreadsheets includes a multi-level Sort command, so you can set the date column as the first sort level and the time column as the second level to arrange times from earliest to latest within each date.
- 1. Download and install WPS Office: Download WPS Office Free from the official website and install it on your computer.
- 2. Open your Excel file: Launch WPS Office Spreadsheets and open the .xlsx or .xls file that contains the date and time columns.
- 3. Select your data range: Select all rows and columns that need to move together, including the event name, date, and time columns.
- 4. Open Sort: Click the Data tab and choose Sort > Custom Sort.
- 5. Add the date and time levels: Set the date column as the first level and the time column as the second level, both in ascending order, then click OK.

Frequently Asked Questions
Can I sort by time only without moving the dates?
Yes. In the Sort dialog, add the date column as the first level and the time column as the second level. This keeps dates grouped and sorts times within each date.
Why are my times sorting incorrectly even though the order is ascending?
The times may be stored as text instead of real time values. Check the cell format and convert text to time, then open Data > Sort > Custom Sort and sort the time column as a value.
Does WPS Office Spreadsheets support SORT and SORTBY?
SORT and SORTBY are Microsoft 365 and Excel 2021 dynamic array functions. In WPS Office Spreadsheets, use Data > Sort > Custom Sort to achieve the same multi-column sorting result.
How do I sort by multiple columns in WPS Office?
Select your data, click the Data tab, choose Sort > Custom Sort, and add multiple levels using Add Level. Then set the column and order for each level.
Will this sorting method keep all my rows together?
Yes, as long as you select all columns that belong to the same records before opening the Sort dialog, the entire rows move together during sorting.




