KeepSorted

Google Sheets sort formula generator

Fill in your range and the columns to sort by, and get a formula for an empty cell. It makes a sorted copy of the table that updates by itself whenever the original changes. Pick plain SORT for several columns, SORT with ranges (Sheets' answer to Excel's SORTBY), QUERY with order by, SORTN to drop repeated rows, or a custom order such as High, Medium, Low. The formula is built in your browser; nothing you type here is sent anywhere. Checked against Google's Sheets function help on 1 November 2026.

1 2 3
Your formula
={A1:F1; SORT(FILTER(A2:F, A2:A<>""), 1, TRUE)}

The numbers count columns from the start of the range (A = 1), TRUE = A to Z, FALSE = Z to A.

How to use it

Put this in an empty cell; it makes a sorted copy that updates by itself. A new tab works best (type the range with its tab name, like Data!A1:F). The copy needs empty cells to its right and below as wide and tall as the table; if something is in the way, Sheets shows #REF! with "Array result was not expanded". Do not put it inside the columns it reads, or it refers to itself.

Which formula to pick

The catches

No code: KeepSorted

The add-on sorts the original in place without code: no second copy, so formatting, checkboxes and notes move with their rows and people keep editing the same table. Select the range, pick the sort columns, Save. Free: one area per tab, up to 2 sort columns, no trial clock. Pro ($5/month or $39/year): up to 5 sort columns, custom orders like High > Medium > Low, ticked checkbox rows to the bottom, stacked tables sorted separately, and sorting after form responses, other editors' changes and an hourly check.

KeepSorted is built and in testing. It is not in the Google Workspace Marketplace yet. Leave your email and we send one message when you can install it.

You're on the list. We'll email you when KeepSorted is ready.

The generators and the formulas stay free either way.

More KeepSorted tools and guides

Sources