Find the Lowest Nonzero Quote and Supplier Header in Excel 2016
Question details
Find the lowest nonzero haulage quote for a postcode area and return the corresponding supplier header.

- Product
- Microsoft Excel 2016
- Device & OS
- not provided
- Scenario
- A quote table contains postcode areas and multiple supplier columns, and the user wants to identify the cheapest valid supplier.
- Observed behavior
- The desired result is the lowest positive quote for each postcode area and the supplier or suppliers offering it.
Check that postcode areas and supplier names have column headers and that quotes are numeric. Decide whether each postcode area appears once or can appear on multiple rows; this determines which approach to use.
Use Power Query to find the cheapest supplier for each postcode area
Use this method for a growing table or when a postcode area can appear on multiple rows.
Unpivoting turns supplier headers into values, making it easier to find the minimum quote per postcode area and return every supplier tied at that price.
Select the data, choose Insert > Table, and confirm that the table has headers. Then select a table cell and choose Data > From Table/Range.
In Power Query, select the postcode area column, then choose Transform > Unpivot Columns > Unpivot Other Columns. Rename Attribute to Supplier and Value to Quote.
Set the Quote column to a numeric data type. Open its filter and choose Number Filters > Greater Than, then enter 0.
In the Queries pane, right-click the cleaned query and choose Reference. In the new query, select the postcode area column and choose Home > Group By. Group by postcode area, name the new column Minimum Quote, and select the Min operation on Quote.
With the grouped query open, choose Home > Merge Queries. Select the cleaned query as the second table. Select the postcode area and Minimum Quote columns in the first table, then select the postcode area and Quote columns in the same order in the second table. Use an inner join and expand the merged column to show Supplier.
Choose Home > Close & Load to return the results to Excel. After changing the source table, use Data > Refresh All to update them.

Use formulas to return the lowest quote and header from one row
Use this shorter method when each postcode area has exactly one row of supplier quotes.
Find the cheapest supplier with WPS Spreadsheet
Open your quote workbook in WPS Spreadsheet and use formulas to find the lowest positive quote and its supplier header for each postcode row.
- 1. Open the workbook: In WPS Spreadsheet, choose Open and select your quote workbook.
- 2. Check the layout: Place supplier headers in B1:D1 and the quotes for one postcode area in B2:D2, or adjust the formula ranges to match your sheet.
- 3. Find the lowest quote: In E2, enter =IF(COUNTIF(B2:D2,">0")=0,"",MIN(IF(B2:D2>0,B2:D2))). Press Ctrl+Shift+Enter if your WPS version requires array formula entry.
- 4. Return the supplier: In F2, enter =IF(E2="","",INDEX($B$1:$D$1,1,MATCH(E2,B2:D2,0))) and press Enter. Copy the formulas down for other postcode rows.

Frequently Asked Questions
How do I exclude zero quotes from the minimum?
In Power Query, filter the Quote column with Number Filters > Greater Than and enter 0. In the row formula, IF(B2:D2>0,B2:D2) selects positive quotes before MIN is calculated.
What happens if two suppliers offer the same cheapest quote?
The Power Query merge returns all matching suppliers. The INDEX and MATCH formula returns the first matching supplier header in the row.
Why does the minimum formula return a blank?
The example formula returns a blank when COUNTIF finds no positive numbers in B2:D2. Check that the quotes are positive numbers rather than text.
Can I use the row formula when a postcode area appears multiple times?
The formula finds the minimum within each individual row, not across all rows for an area. Use the Power Query grouping method to find the minimum across repeated postcode areas.




