Data Import & Export

Create a Custom Sort Order for Product SKUs in Excel

Algirdas JasaitisAlgirdas Jasaitis Dec 2, 2026 869 views

Question details

Sort parent and child product SKUs by range, color, and a specified size sequence rather than by text embedded in the SKU.

Create a Custom Sort Order for Product SKUs in Excel
Product
Microsoft Excel
Device & OS
not provided
Scenario
A product list contains parent and component rows that need to be grouped and sorted using product attributes.
Observed behavior
The desired order groups related rows by parent SKU, range, and color, then orders sizes as SIN, SMDBL, DBL, and KNG.
Before you start

Check which parent SKU, range, color, and size belong to each component row. Make sure your data has column headers and identify any size codes that are not in your intended sequence.

Solution 1Recommended

Sort SKUs with Helper Columns and a Numeric Size Order

Use this method to keep related product rows grouped and apply a size sequence that does not depend on the SKU text.

1
Add product attributes

Insert columns labeled Parent SKU, Range, Color, and Size. Enter the appropriate values on every row, including each child or component row.

2
Assign size ranks

Add a SizeOrder column and enter 1 for SIN, 2 for SMDBL, 3 for DBL, and 4 for KNG. Assign a rank to any other size codes before sorting.

3
Select the complete dataset

Select all columns and rows in the product list, including the headers, so each SKU stays with its attributes.

4
Set the sort levels

Open Data > Sort and check My data has headers. Add ascending sort levels for Parent SKU, Range, Color, and SizeOrder, in that order, then select OK.

Sort SKUs with Helper Columns and a Numeric Size Order
Keep parent rows first if needed: If rows share all four sort values, add a RowOrder helper column with 0 for the parent and 1 for its children. Add RowOrder as the final ascending sort level.
Sort product data in WPS

Apply a Custom SKU Size Order in WPS Spreadsheet

Use helper columns and a multi-level sort in WPS Spreadsheet to group product rows and apply your own size sequence.

  1. 1. Open the product list: Open your Excel workbook in WPS Spreadsheet and select the worksheet containing the SKUs.
  2. 2. Add helper columns: Add Parent SKU, Range, Color, Size, and SizeOrder columns, and fill the applicable values for every product row.
  3. 3. Rank the sizes: In SizeOrder, enter 1 for SIN, 2 for SMDBL, 3 for DBL, and 4 for KNG.
  4. 4. Sort the full list: Select the complete dataset, open Data > Sort, and add ascending levels for Parent SKU, Range, Color, and SizeOrder. Confirm that the header row is identified, then apply the sort.
Sort product sizes by numeric rank instead of SKU textGroup parent and component rows using shared attributesOpen and edit Microsoft Excel XLSX and XLS filesUse a familiar spreadsheet interface
microsoft office alternative - wps office

Frequently Asked Questions

Why should I repeat product attributes on every component row?

Excel sorts individual rows using the values in each selected sort column. Repeating the parent SKU, range, color, and size gives every component row the keys needed to stay in the correct group.

Why not sort directly by the SKU column?

An SKU text sort follows the characters in the SKU, which may not match your desired size sequence. Use a numeric SizeOrder column as the final size sort key instead.

How can I keep a parent row above its children?

Add a RowOrder column with 0 for the parent and 1 for children, then add it as the final ascending level in Data > Sort. This puts the parent first among rows that share the preceding sort values.

What should I do if a product has a size outside the listed codes?

Choose where the additional size belongs in the sequence and give it an appropriate numeric rank in SizeOrder before running Data > Sort.