Hongmu Notes

Text sorting

Contents such as names and numbers are best arranged in alphabetical order.
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.

Contents such as names and numbers are best arranged in alphabetical order.

comparison rules

Compare the encoding order of characters bit by bit, comparing the first bit first and then the second bit.

Two items with the same prefix, the shorter one comes first.

Chinese arrangement

Chinese characters are arranged in coding order, and characters with the same radical are usually clustered together.

Instead of arranging them by pinyin, you have to find another way when you need pinyin order.

Suitable for content

Text columns such as name, number, category, region, and product name.

It is recommended to keep the numbering digits consistent, otherwise the order will be uneven.

Difference from numerical value

Text comparison for purely numerical content will result in bitwise order, not size order.

When there are both numbers and text, first confirm whether numerical comparison should be used.

Result check

Check whether the target columns are in the same character order.

Randomly check two adjacent items to make sure there are no jumps or wrong lines.

Use text comparison for names and numbers; use numerical comparison for pure numeric columns instead.

📖 Glossary

sort key
The column according to which the sorting is based can be a single column or a combination of multiple columns arranged according to priority.
Ascending and descending order
Ascending order is from small to large or forward in character order, while descending order is the opposite. The results of the two directions for the same set of data are completely reversed.
stable sorting
Rows with the same sort key value maintain their original order and will not be swapped due to sorting.
numerical comparison
First parse the cell content into numbers and then compare the sizes to avoid misordering when comparing by characters.
text comparison
Compare one by one in character encoding order. Chinese characters are usually arranged in encoding order, which is suitable for names and numbers.
multi-level sorting
Sort by the first column first, then sort by the second column if the values are the same, and so on to form a hierarchical order.
Header
The field names in the first row of the table should be fixed in the first row when sorting to avoid being treated as data for comparison.
Group sorting
First sort by a certain column within the group, and then decide the order of the groups. It is often used to organize lists by department or region.
Null value handling
The arrangement position of the cell when it is empty. When comparing numerical values, space-time values ​​are usually sorted at the end, making it easier to see valuable data first.
delimiter
Characters used to separate columns, tabs used for content copied by spreadsheet software, and commas used for comma-delimited files.

🔗 All keywords and tutorials

Keywords page of the tool12a

Return to tool home page

❓ FAQ

Is Chinese arranged in pinyin?
No, according to the character encoding order, words with the same radical will be adjacent.
Which comparison should be used for numbered columns?
Numbers with the same digits are most neatly compared with text.