Custom Excel Sorting: Sorting a List of Values

Abstract: Define custom sort orders in Excel for days, months, or priorities to override default alphabetical sorting.

Created: 2026-07-29 by

Sort a list of values in Excel by defining a custom list through the Options menu or using the Sort dialog’s "Custom List" option. This method ensures specific orders for items like days, months, or industry terms, handling special characters and accented letters correctly without relying on default alphabetical rules.

Understanding Default vs. Custom Sorting

By default, Excel sorts data alphabetically (A-Z) or numerically (Smallest to Largest). While this works for standard text, it fails when you need a specific logical order that does not follow the dictionary sequence. For example, sorting days of the week alphabetically would place "Friday" before "Monday," which is often incorrect for scheduling or reporting purposes. Similarly, sorting months might result in "April" coming before "August" simply because 'A' comes before 'A', but then 'pril' vs 'ugust' creates confusion if not handled properly, or more commonly, it places them in strict ASCII order rather than calendar order. This limitation becomes more pronounced with industry-specific hierarchies, such as priority levels (Low, Medium, High) or product categories. If you have a list of priorities where "High" should come first, default sorting will push it to the end because 'H' is near the middle of the alphabet. To solve this, Excel provides two primary mechanisms: creating a permanent custom list for reuse or applying a one-time custom sort within the Sort dialog. Both methods allow you to define the exact sequence your data should follow. For users dealing with complex datasets involving multiple columns, understanding how these custom lists interact with other sorting criteria is vital. You can read more about managing these lists in Correctly Sorting an Excel Custom List: A Step-by-Step Guide.

Method 1: Creating a Permanent Custom List

Creating a custom list allows you to define a sequence once and use it across multiple sheets or workbooks. This is ideal for static lists like days of the week, months, or standard business ranks. First, navigate to the File tab and select Options. In the Excel Options dialog box, click on Advanced in the left-hand pane. Scroll down until you find the section labeled General. At the bottom of this section, there is a button labeled Edit Custom Lists.... Clicking this opens a new dialog box. In the Custom Lists window, you can either import a list from your worksheet or type it manually. To import, click the Import button and select the range of cells containing your desired order in the spreadsheet. Ensure the cells are in the exact order you want them sorted (e.g., cell A1 contains the first item, A2 the second, etc.). If you prefer manual entry, type each item into the List entries box, pressing Enter after each one. Once your list is defined, click Add and then OK. Now, whenever you sort a column containing these items, go to the Data tab, click Sort, and under Order, select Custom List... instead of "Cell Values." Your newly created list will appear in the dropdown, allowing you to apply that specific sequence.

Method 2: One-Time Custom Sort via Dialog Box

If you do not want to save the list permanently, you can define the sort order directly within the Sort dialog. This is useful for ad-hoc reports or temporary data organization. Select the range of data you wish to sort, including headers if applicable. Go to the Data tab on the Ribbon and click the Sort button. In the Sort dialog box, ensure your key column is selected in the Column dropdown. Under Sort On, choose Cell Values. Crucially, change the Order dropdown from "A to Z" or "Largest to Smallest" to Custom List.... A small window will pop up showing available custom lists. If you have previously created lists, they will appear here. If not, you may need to create one using Method 1 first, as Excel requires a defined list to reference in this dropdown. Select your desired list and click OK. The data will now be rearranged according to the sequence you specified. Note that this method does not create a new list; it only applies an existing one. For advanced scenarios involving alphanumeric sorting or syncing columns during the process, refer to Advanced Sorting: Alphanumeric Orders and Column Synchronization.

Handling Special Characters and Accents

Excel’s sorting engine generally respects Unicode standards, meaning accented characters like "é" or "ñ" are treated distinctly from their base letters. However, the behavior can vary depending on your system's locale settings. In many Western locales, Excel treats accented characters as variants of the base letter for primary sorting, but distinguishes them for secondary sorting. When using custom lists, special characters are included as part of the string value. Therefore, if you include a hyphenated term like "Pre-Alpha" in a custom list, it will be treated exactly as typed. Ensure that your custom list entries match the formatting of your source data precisely, including spaces and punctuation. Mismatches in case sensitivity (e.g., "Item" vs "item") can also cause issues if your data contains mixed cases. It is best practice to standardize your data casing before sorting to avoid unexpected results.

Troubleshooting Common Issues

If your custom sort does not seem to work, check several common pitfalls. First, verify that the data type is consistent. Text formatted as numbers, or vice versa, can interfere with sorting logic. Second, ensure that no merged cells exist within the sort range, as this can disrupt the alignment of rows. Third, confirm that the custom list actually contains the exact strings found in your data. If your data has leading or trailing spaces, the sort may fail to recognize the match. Use the TRIM function to clean your data if necessary. Additionally, remember that custom lists are stored per-user profile. If you switch computers or share the workbook, the custom list may not be available unless exported or recreated. For guidance on exporting these settings, consult resources on managing Excel preferences.

Frequently Asked Questions

Why doesn't my custom list appear in the Sort dialog?

The custom list must be created in Excel Options before it appears in the Sort dialog's Order dropdown. If you cannot see it, go to File > Options > Advanced > Edit Custom Lists to verify its existence. Ensure you clicked Add after entering the list entries.

Can I sort numbers within a custom list?

Yes, you can include numbers in a custom list, but they are treated as text strings. This means "10" will come before "2" if sorted strictly by character code unless you define the order explicitly in your custom list. Define the sequence manually to control numeric placement.

How do I remove a custom list I no longer need?

Go to File > Options > Advanced > Edit Custom Lists. Select the list from the left pane and click Delete. Confirm the action. This removes the list from your profile, so future sorts will revert to default alphabetical ordering for those items.

Does custom sorting affect the entire row?

Yes, when you sort a range, Excel moves all data in the same row together to maintain data integrity. Ensure your selection includes all relevant columns. If you only select one column, Excel may warn you that the selection does not match the entire range, asking if you want to expand the selection.

What happens if my data contains items not in the custom list?

Items not present in the custom list are typically sorted alphabetically among themselves, usually appearing at the end or beginning depending on the sort direction. Excel prioritizes the custom list order for matching items, leaving unmatched items in a default secondary sort. Check your data for typos that might prevent matches.

Latest News

How to Display Output of xterm Command in Terminal Screen using Cron

Resolve the inability to display xterm output in a terminal screen from cron by redirecting logs or using wall instead of insecure X11 workarounds.

Read More
Expose Local Server on VPS Preserving Real Client IPs (OS Level)

Resolve VPS logging showing only gateway IPs by configuring reverse proxies to forward real client addresses via X-Forwarded-For headers.

Read More
How to Clear Recent Files History in Linux without Deleting Actual Files?

Clear recent files history in Linux by deleting ~/.local/share/recently-used.xbel without removing the actual files.

Read More
Best HDD Copy Strategy: Manually Syncing and Rewriting Scratch

Resolve data drift between two 4TB hard drives by using rsync with the --delete flag to manually sync and rewrite scratch data for an exact mirror.

Read More
Understanding Bash Prompt Abbreviations: An Overview

Resolve repetitive typing errors by creating and persisting Bash aliases in the .bashrc file for improved command-line efficiency.

Read More
Free Tools and Methods to Log Real-Time Performance Details in Task Manager

Log real-time CPU and memory metrics to CSV files using Windows Performance Monitor Data Collector Sets to troubleshoot system slowness.

Read More
Contact Qatar Airways Customer Service: Phone Number, Help Center, and More

Resolve urgent Qatar Airways reservation issues like flight changes and baggage claims using the US phone number +1801-855-5905 or online self-service tools.

Read More
Windows 11: Alt Codes Displaying Wrong Characters - Solutions

Resolve Windows 11 Alt codes showing wrong characters by verifying the US keyboard layout and enabling Num Lock.

Read More
Run Programs with Elevated Privileges: A Comprehensive Guide

Eliminates the need to type sudo for frequent administrative tasks by configuring .bashrc aliases or functions.

Read More
Dynamically Changing Dates in Excel Formulas Using Cells

Eliminate manual date updates in Excel by using cell references to create dynamic formulas that automatically adjust calculations when input dates change.

Read More
Granting Edit Access to a Specific Excel Sheet in an Office 365 User Email ID-Based Login

Excel Online lacks native sheet-level permissions, so users must split workbooks or use worksheet protection to isolate edit access for specific tabs.

Read More
Creating Network Load on Local Wi-Fi from One PC

Generate sustained Wi-Fi bandwidth load from a single PC using a VM SFTP server to test router stability and throughput.

Read More
Changing the Default Editor for Batch Files in Windows 11's File Explorer

Resolve the issue of batch files opening in Notepad by changing the default editor to a preferred application like VS Code.

Read More
Gain WiFi Connection Minutes Before Losing it by Changing MAC Address

Bypass MAC address filtering to restore WiFi connectivity temporarily when a device is blocked by network administrators.

Read More
Photos Folders Turned Black: Troubleshooting Picture Applications on Windows

Resolve black screens in Windows Photos by resetting the app, updating graphics drivers, and repairing system files.

Read More
Troubleshooting High CPU Temperature Values: A Step-by-Step Guide

Resolve high CPU temperatures and thermal throttling by monitoring with Speedfan, cleaning dust from cooling components, and replacing degraded thermal paste.

Read More
Make cURL establish TLS connection with CA unknown

Resolve cURL TLS connection failures with unknown or self-signed certificates by using the --insecure flag to bypass CA validation.

Read More
Troubleshooting Incorrect Network Metrics Values in Grafana, Prometheus, InfluxDB, and Telegraf

Fix incorrect network metrics in Grafana, Prometheus, InfluxDB, and Telegraf by verifying interface selection, resolving unit mismatches, and handling counter resets.

Read More
Start Another Terminal Window (cmd.exe) Windows Repair/Troubleshoot

Provides step-by-step instructions to access the Windows Command Prompt via bootable media for advanced system repair and troubleshooting.

Read More
Thinkpad P1 Gen 6: Sudden Thunderbolt 3 Dock USB-C Charging Stopped Working

Resolve sudden Thunderbolt 3 dock USB-C charging and internet failure on ThinkPad P1 Gen 6 by updating firmware, resetting the dock, and adjusting power settings.

Read More
ASUS Windows 11 Laptop: Internet Connection Issue with Hotspot

Resolve ASUS Windows 11 laptop spinning wheel issue when connecting to mobile hotspot by resetting network stack, disabling IPv6, and adjusting power settings.

Read More
Developing iOS Project with Firebase: Logging in and Sending Push Notifications

Integrates Firebase to enable secure user authentication and push notifications in iOS applications.

Read More
Troubleshooting Bash Script with Suspected Issues of Spaces, Dashes, Filenames and Quoting

Resolve Bash script failures caused by word splitting, globbing, and special characters in filenames by applying proper quoting techniques.

Read More
Populating OneDrive Folder for Local Backup without Affecting Remote Files

Prevent OneDrive from deleting remote files during Windows reinstallation by unlinking the account or using symbolic links to isolate local data.

Read More
Force First Frame as Keyframe Without Re-encoding: A Quick Solution

Resolve inaccurate seeking and playback glitches by re-encoding video to ensure the first frame is a valid keyframe.

Read More
Find Information in Database Using WSL (Ubuntu) on Windows-10

Resolve database connection issues from WSL Ubuntu on Windows 10 by configuring client tools and network access to query remote or local servers.

Read More
Configuring a New Router with Different Networks: One Family, One Guest

Resolve IP conflicts and isolate guest traffic by configuring a second router with a distinct subnet via its WAN port.

Read More
Quickly Open Multiple Stock Websites with a Single Command

Solve the problem of manually opening multiple stock research websites by creating a single command to launch them simultaneously on Windows, macOS, or Linux.

Read More
Improved Adobe Acrobat Search Experience: Access Advanced Search with Ease

Access advanced search filters like case sensitivity and regex in Adobe Acrobat by clicking More Options in the Find bar.

Read More
Port Forwarding VM via OpenVPN: A Comprehensive Guide

Configure OpenVPN server and iptables to forward specific ports from VPN clients to a virtual machine's internal IP address.

Read More
Understanding Partitions in the 1980s: A Look Back at MS-DOS and Master Boot Record

Explains how the Master Boot Record and partition table enabled MS-DOS to manage multiple disk volumes on a single physical drive.

Read More
Windows 10 Enterprise: Keyboard Not Detected in Managed Organization with Admin Privileges

Resolve Windows 10 Enterprise keyboard detection failures caused by Group Policy restrictions, driver corruption, or USB enumeration errors.

Read More
Can't Find x86_64 Versions of Applications on MacOS arm64 (M1)

Resolve missing x86_64 app issues on M1 Macs by installing Rosetta 2 and reinstalling apps as universal binaries.

Read More
How to Hide Installation Source for an Android App

Manage Android app installation source visibility by using USB transfers or file managers to reduce browser traces and isolate data via work profiles.

Read More
Connecting Momentus 4200.2 ST9808210A Hard Drive via USB Cable

Resolve inability to access Seagate Momentus 4200.2 ST9808210A hard drive by connecting it via USB using a compatible SATA-to-USB adapter and configuring the disk in Windows.

Read More