Rank Supplier Prices by Part with a Dynamic Excel Formula
Question details
Create a dynamic formula that lists parts in rows and ranks supplier names across columns by price for each part.

- Product
- Microsoft Excel
- Device & OS
- not provided
- Scenario
- A price table contains one row per part and a separate price column for each supplier.
- Observed behavior
- The desired result is a spilled table with each part followed by its suppliers in ascending price order.
Use a version of Excel that supports dynamic arrays, including LET, REDUCE, VSTACK, DROP, SORTBY, and SEQUENCE. Arrange the source with the part in the first column, a metadata field in the second column, and supplier names as headers from the third column onward; each supplier price should be numeric and present.
Build a Dynamic Supplier Ranking Table in Excel
Use this formula to list each part and spill its supplier names from lowest to highest price.
The formula assumes one source row per part. It creates rank headings across the top and returns supplier names rather than prices.
Select the source range, choose Insert > Table, and confirm that the table has headers. On the Table Design tab, set the table name to PartTable.
Select an empty cell outside the table and enter: =LET(h,DROP(PartTable[#Headers],,2),prices,DROP(PartTable,,2),parts,CHOOSECOLS(PartTable,1),n,COLUMNS(prices),ranked,DROP(REDUCE("",SEQUENCE(ROWS(prices)),LAMBDA(acc,r,VSTACK(acc,SORTBY(h,INDEX(prices,r,SEQUENCE(1,n)))))),1),VSTACK(HSTACK("Part","Rank "&SEQUENCE(1,n)),HSTACK(parts,ranked)))
Press Enter and check that each row shows a part followed by its supplier names in ascending price order. Leave the surrounding cells empty so the result can expand as the table changes.

Review Supplier Price Tables in WPS Spreadsheet
WPS Office is a free, lightweight alternative with a familiar spreadsheet interface for opening and working with Excel files. You can migrate existing workbooks easily, but check formula compatibility before relying on Excel-specific dynamic-array functions.

Frequently Asked Questions
Will the ranking update when I change a supplier price?
Yes. When a numeric price in PartTable changes, Excel recalculates the formula and updates the supplier order for that part.
Can the formula include new parts and suppliers?
Yes. Add new part rows or supplier columns to PartTable, and the structured references will expand. Make sure there is enough empty space for the larger spilled result.
Why does the formula show a #SPILL! error?
Select the formula cell and check the outlined spill range. Clear any cells blocking the result, and make sure the formula is outside an Excel Table.
What if my supplier columns start somewhere other than the third column?
Adjust both DROP expressions to remove the number of columns before the first supplier column. Also adjust the parts reference if the part names are not in the first column.
Does the formula show the ranked prices?
No. It sorts the supplier header names by their corresponding prices. The output contains the part name and supplier names, with rank labels across the top.




