SORT Function in ONLYOFFICE Spreadsheet Editor: Examples and Syntax
SORT in ONLYOFFICE Spreadsheet Editor: sort a two-column price list without changing source data using practical sample data, clear expected results, pitfalls and the official function documentation.
Reference checked: Examples have not been run in this spreadsheet application. How we verify guides
Quick answer: Sort a two-column price list without changing source data. You want a price-sorted view of a catalog while leaving the original list untouched for editing.
This page covers the ONLYOFFICE Spreadsheet Editor implementation specifically. Its example values and expected results are original educational data, not screenshots or claims of a live application test.
Syntax and argument order
=SORT(array, [sort_index], [sort_order], [by_col])
The argument order above follows the official ONLYOFFICE Spreadsheet Editor documentation. Use the function name shown here, and replace placeholder arguments with ranges, cell references or criteria from your workbook.
Worked example with sample data
| Row | A: Item | B: Price |
|---|---|---|
| 2 | Pens | 8 |
| 3 | Tape | 3 |
| 4 | Pencils | 5 |
| 5 | Envelopes | 10 |
Enter this formula in a free result cell (outside the input range):
=SORT(A2:B5,2,1)
Expected result: Tape 3; Pencils 5; Pens 8; Envelopes 10.
Why this result is correct: The second argument means “sort using column 2 of the selected array”; the third argument 1 means ascending order. Both fields move together.
A second example or variation
=SORT(A2:B5,2,-1)
Expected result: Envelopes 10; Pens 8; Pencils 5; Tape 3.
The negative sort order puts the most expensive items first.
Common mistakes and troubleshooting
If prices are imported as text, sorting can behave unlike numeric order. Convert their cell types before using the result for ranking.
Also check that the version of ONLYOFFICE Spreadsheet Editor you use supports this function. A formula pasted from another application can fail because of different syntax, date interpretation, array behavior or regional separators. If the result differs, first compare the small dataset above with the expected answer before substituting your real data.
Where this function helps
You want a price-sorted view of a catalog while leaving the original list untouched for editing. Replacing the sample cells with your own ranges lets you reuse the same reasoning. On important spreadsheets, test with a few known rows, verify the final cell formatting and keep a separate copy of the source data.
Practical checks before reusing this formula
SORT can create an output array while leaving the source unsorted. This is different from sorting source rows in place using a spreadsheet menu command.
When sorting a multi-column range, ensure the selected sort column belongs to that range. Test records with repeated keys to see whether tie order matters.
To compare this function with other spreadsheet programs, use our eight-software function comparison. A missing guide does not mean a function is unsupported in another product; check its official documentation.
Official reference and verification
- Official ONLYOFFICE Spreadsheet Editor — SORT reference
- Verification status: Official documentation checked; example outcome independently reasoned or arithmetically checked where applicable. Not executed in ONLYOFFICE Spreadsheet Editor.
- No genuine ONLYOFFICE Spreadsheet Editor screenshots are included; this guide does not use mock application images.