How to Use the SORTBY Function in WPS on Windows

Last updated:July 23, 2026

This how-to guide includes 3 topics: creating a formula field and entering SORTBY, checking the parameter structure, and saving a basic example; all 3 are available without membership.

How-to Index

How-to Guide

1. Create a formula field and enter SORTBY

Entry path: Add Field → Formula

  1. Open the database sheet that you want to edit.
  2. Click Add Field.
  3. Select Formula as the field type.
  4. Enter a formula that includes SORTBY in the formula editor.
  5. Click Confirm to save the setting.

Success Criteria

  • On-screen result: A new formula field appears in the table.
  • Next action available: You can continue editing parameters and review the calculated result.

Tips While Using

  • Common mistake: Selecting the wrong field type before entering the function.
  • Environment note: The current table must allow field editing.

2. Check the SORTBY parameter structure

Entry path: Formula Editor → Function Library → SORTBY

  1. Open the formula editor in a formula field.
  2. Open the function library or function help area.
  3. Select SORTBY to view its structure.
  4. Fill in the target range and sorting reference based on the editor prompts.

A basic structure can look like this:

SORTBY(
  [parameter1],
  [parameter2],
  ...
)

Success Criteria

  • On-screen result: You can see the SORTBY function name and parameter positions.
  • Next action available: You can continue completing and saving the formula.

Tips While Using

  • Common mistake: Leaving parameters incomplete or placing them in the wrong order.
  • Environment note: Parameter content should match the actual field structure in your table.

3. Write and save a basic SORTBY example

Entry path: Formula Editor

  1. Enter a basic SORTBY formula in the formula field.
  2. Replace the sample range or sorting reference with data from the current table.
  3. Check that the formula syntax is complete.
  4. Click Confirm to save it.
  5. Review the returned result in the formula field.

Example:

= SORTBY(target_range)

Success Criteria

  • On-screen result: The formula field displays a calculated result.
  • Next action available: You can continue observing updates when source data changes.

Tips While Using

  • Common mistake: Copying the example directly without replacing it with actual table data.
  • Environment note: If referenced data types do not match, the result may not display correctly.