How to Sort Blocks of Rows and Columns Alphabetically in WPS Office Spreadsheet
Question details
The user needs to alphabetically sort blocks of rows and columns in a WPS Office spreadsheet without separating each row's related values.

- Product
- WPS Office Spreadsheet
- Device & OS
- not provided
- Scenario
- The user is working with a spreadsheet data block and wants to sort records alphabetically by a key column while keeping all related cells in each row together, adding secondary sort levels or sorting separate blocks when necessary.
- Observed behavior
- Sorting a single column alone can disassociate records; selecting the full data block and choosing the key column is required to keep row relationships intact.
Before sorting, check that each block has a clear header row and no blank rows or columns inside the selected range. If you have separate blocks, leave a blank row or column between them or select each block independently.
Sort a Data Block Alphabetically by a Key Column
Use this method when you have one continuous block and need to sort rows alphabetically without splitting related values.
Sorting the complete block tells WPS Office to treat the selected rows as one unit, so each row's values move together. If you sort only the key column, the other columns stay in place and records become disassociated.
Click any cell in the data block, then press Ctrl+A or drag to select all rows and columns that belong together, including the header row.
Go to the Data tab in WPS Office and click Sort.
Under Sort by, select the column containing the names or values to sort alphabetically. Keep Sort On set to Values and choose A to Z under Order.
Click Add Level, choose the next column under Then by, set Values, and select A to Z or Z to A for the secondary order.
Click OK. WPS Office sorts the selected block alphabetically and keeps each row's related cells together.

Sort Separate Blocks Independently or Convert a Block to a Table
Use this method when your worksheet contains several separate data blocks and each block needs its own alphabetical order.
Sort Columns Alphabetically by a Row Using Left-to-Right Sort
Use this method when the alphabetical labels are in a row and you need to reorder entire columns horizontally.
Sort Data Blocks Alphabetically in WPS Office Spreadsheet
Use WPS Office Spreadsheet to select a complete data block, open Data > Sort, choose the key column, set A to Z, and add levels for secondary sorting. It keeps related rows together and preserves .xlsx Excel format compatibility.
- 1. Open your workbook in WPS Office: Launch WPS Office and open the Excel-compatible spreadsheet that contains the data blocks.
- 2. Select the full data block: Click inside the block and press Ctrl+A, or drag to select all rows and columns that belong together.
- 3. Open Data > Sort: Go to the Data tab and click Sort to open the sorting dialog.
- 4. Choose the key column and order: Under Sort by, select the alphabetical key column, set Sort On to Values, and choose A to Z.
- 5. Add a secondary level and confirm: If needed, click Add Level for another column, then click OK to apply the sort.

Frequently Asked Questions
Can I sort only one column alphabetically in WPS Office?
Yes, but if you select only one column and sort it, the other columns stay in place and the row records become disassociated. To keep related values together, select the entire data block before sorting.
How do I add a secondary sort level in WPS Office?
In Data > Sort, click Add Level, choose the second column under Then by, set Sort On to Values, and select A to Z before clicking OK.
How do I keep the header row from being sorted?
Include the header row in your selection and check My data has headers in the Sort dialog. This tells WPS Office to exclude the header from the alphabetical order.
Can WPS Office sort separate data blocks independently?
Yes. Select each block one at a time and sort it separately, leaving blank rows or columns between blocks out of the selection. You can also convert each block to a table for clearer boundaries.
Does WPS Office support sorting columns from left to right?
In Data > Sort, click Options, choose Sort left to right, and then select the row that contains the labels to sort. This reorders columns alphabetically based on that row.




