Can I save a sort for future use in Numbers

I have a table in Numbers on MacBook Air, and I want to sort it by two columns or by four (different) columns depending on the information which I need. I can successfully type both sorts into the Sort Options pane, but is there a way to save a sort for future use?

MacBook Air 13″, macOS 15.1

Posted on Jan 31, 2025 2:36 AM

Reply
Question marked as Top-ranking reply

Posted on Jan 31, 2025 11:01 AM

No. There's no mechanism for saving sorts within Numbers - they are a kind of one-and-done thing.


There is a kind of workaround, which is that you can use AppleScript to initiate the sort. It's a little non-intuitive, but you could write separate AppleScripts for the different sort mechanisms you want and then invoke the script as needed.


Here's an example AppleScript that sorts by two columns:


tell application "Numbers"
	tell document 1
		tell sheet 1
			tell table 1
				sort by column "F" direction descending
				sort by column "A"
			end tell
		end tell
	end tell
end tell


Paste that into a new Script Editor document and click Run.


Hopefully the syntax is clear enough for you to be able to edit/amend to your own sorting needs.

Similar questions

1 reply
Question marked as Top-ranking reply

Jan 31, 2025 11:01 AM in response to JanGar5

No. There's no mechanism for saving sorts within Numbers - they are a kind of one-and-done thing.


There is a kind of workaround, which is that you can use AppleScript to initiate the sort. It's a little non-intuitive, but you could write separate AppleScripts for the different sort mechanisms you want and then invoke the script as needed.


Here's an example AppleScript that sorts by two columns:


tell application "Numbers"
	tell document 1
		tell sheet 1
			tell table 1
				sort by column "F" direction descending
				sort by column "A"
			end tell
		end tell
	end tell
end tell


Paste that into a new Script Editor document and click Run.


Hopefully the syntax is clear enough for you to be able to edit/amend to your own sorting needs.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Can I save a sort for future use in Numbers

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.