Hongmu Notes

🔀 Table multi-column sorting

Paste the table data and specify the column and direction for sorting to get the sorted results; you can set a second sort key to handle the situation where the values are the same.
100% Browser local processing 0 Data upload

🔀 Sort settings

💡 Instructions for use

  • Column numbers are counted from left to right in the data, and the first column is one, which is consistent with the column order in the spreadsheet software.
  • Text comparison is arranged in character order, and Chinese is in encoding order, so it is more suitable for names and numbers; numerical comparison will be parsed into numbers first and then compared.
  • After setting the second sort key, rows with the same value in the first column will be sorted according to the rules of the second column, and the result will be more in line with daily habits.
  • When the header is fixed, the first row does not participate in sorting and the position remains unchanged; if the first row is data, please switch this option to Unfixed.
  • The sorting is a stable sorting, and rows with identical values maintain their original order without disturbing their relative positions.
  • The data is only processed in the browser and is not uploaded or saved; if you need to keep the file, please copy or download the results.

🔀 The difference between the two comparison methods

Text comparison compares the size character by character in coding order, which is suitable for names, numbers and categories; numerical comparison first parses the content into numbers and then compares the size, which can avoid misordering of character comparisons such as ten to nine smaller. If the same column contains both numbers and text, the numerical comparison will treat the content that failed to parse as a null value and put it at the end. Therefore, it is best to confirm whether the column is a pure numerical value before execution.

For columns such as fractions, amounts, and quantities, numerical comparison must be selected, otherwise ten will be ranked before nine.

🧩 What problem does the second sort key solve?

When sorting by only one column, the relative order of rows with the same value in that column depends on the original data and looks random. After setting the second sort key, these rows will be sorted according to the rules of the second column, for example, first by group, within group and then by score in descending order. The result will be more in line with reading habits and easier to print and check.

When the primary keys are the same, the order is uncertain. Add a second sort key and the result will be stable.

📋 Header fixation and stable sorting

When the table header is fixed, the first row does not participate in the comparison, and the position is always maintained at the first row; if the first row is actually data, this option must be switched to unfixed, otherwise one row will be missing. The sorting itself is stable: rows with identical values ​​maintain the original order, so the results of repeated executions are consistent, and it is also easy to compare row by row with the data before sorting.

First, confirm whether the first row is a header or data. If this step is wrong, the entire result will be wrong.

🔗 All keywords and tutorials

Keywords page of the tool12a

Return to tool home page

❓ FAQ

What to do when the first columns are the same?
You can set a second sort key: when the values in the first column are the same, compare according to the rules of the second column to obtain a stable order.
Will sorting change the data content??
No. The tool only adjusts the order of rows, and the cell content and column structure remain unchanged.
Why are the numbers messed up??
Mostly text comparison is used. For numeric columns, please switch the comparison mode to numeric, and the columns will be sorted correctly by size.
Can I sort by multiple columns??
This tool supports two sorting keys: sort by the first column first, and then sort by the second column if the values are the same, covering most daily needs.
Will the data be uploaded??
No. Sorting is done entirely within the browser, pasted content is not sent to the server.