Function Problems

How to Find the Lowest-Cost Vendor for Each Reference Number in Excel

Camila MilosovichCamila Milosovich Nov 11, 2026 871 views

Question details

The user needs to retrieve the vendor name and associated cost representing the minimum value for each unique reference number in a spreadsheet.

How to Find the Lowest-Cost Vendor for Each Reference Number in Excel
Product
Excel
Device & OS
not provided
Scenario
Comparing vendor quotes or supplier pricing data grouped by a reference or item number to identify the most cost-effective option.
Observed behavior
Needs a formula or data-modeling method to automatically return the vendor and minimum cost corresponding to each grouped reference number without manual sorting.
Before you start

Ensure your data is organized in standard contiguous columns (e.g., Reference Number, Vendor, Cost) without merged cells, and that your spreadsheet software is updated to a version that supports modern functions like MINIFS.

Solution 1Recommended

Use IF and MINIFS Formulas to Find the Lowest Cost

This method uses the MINIFS function to evaluate the lowest price per reference number and the IF function to return the matching vendor and cost.

The MINIFS function checks a range of data for the minimum value based on one or more criteria. By pairing it with an IF statement, you can instruct Excel to output the vendor data only on the row where the cost matches that mathematical minimum.

1
Identify column layout

Assume your data is structured with the Reference Number in Column A, Vendor in Column B, and Cost in Column C, starting from row 2.

2
Input the logical formula

Select a blank cell in a new column on row 2 (e.g., E2), and enter the formula: =IF($C2=MINIFS($C$2:$C$1000,$A$2:$A$1000,$A2),$B2:$C2,"")

3
Review the initial result

Press Enter. If the cost in row 2 is the lowest for that reference number, the cell will display the vendor and cost; otherwise, it will remain blank.

4
Apply to the entire dataset

Select cell E2 and drag the fill handle (the small square at the bottom-right corner) down to the bottom of your dataset to apply the calculation to all rows.

Use IF and MINIFS Formulas to Find the Lowest Cost
Adjust Data Ranges: Ensure you adjust the row numbers in the absolute references ($1000) to match the actual final row of your dataset so no data is missed.
Advanced Data Analysis

Calculate Minimum Vendor Costs Effortlessly with WPS Office

WPS Spreadsheet fully supports advanced logical and statistical functions like MINIFS, IFS, and standard array formulas, allowing you to seamlessly analyze pricing and vendor datasets in a familiar environment.

  1. 1. Open your dataset: Launch WPS Office and open your vendor data spreadsheet.
  2. 2. Select a formula cell: Select the blank cell next to your first record and click on the formula bar at the top.
  3. 3. Enter the MINIFS function: Type the formula =IF($C2=MINIFS($C$2:$C$1000,$A$2:$A$1000,$A2),$B2:$C2,"") adjusting ranges as needed.
  4. 4. Autofill your calculation: Press Enter and drag the fill handle down to apply the formula across your entire dataset and instantly spot the lowest costs.
Full compatibility with Microsoft Excel formats (.xlsx, .xls), ensuring formulas work perfectly.Supports advanced statistical functions like MINIFS to streamline complex data calculations.Completely free, lightweight, and fast to open even with exceptionally large datasets.
microsoft office alternative - wps office

Frequently Asked Questions

Why does my MINIFS formula return a #NAME? error?

The #NAME? error usually occurs if you are using an older spreadsheet version that does not support the MINIFS function (older than Excel 2019), or if the function name is misspelled. Make sure you are using a modern software version like WPS Office or Microsoft Excel 2019/365 to use this function.

Can I use Pivot Tables instead of formulas to find the lowest vendor cost?

Yes, you can insert a Pivot Table. Arrange the Reference Number in the 'Rows' area and Cost in the 'Values' area. Change the Value Field Settings for Cost to 'Min' to display the lowest cost for each reference number easily.

What if multiple vendors have the exact same lowest cost?

Using the standard MINIFS paired with IF will output all vendors that match that lowest price on their respective rows. The blank cells will only appear for vendors offering a higher cost, allowing you to see all tied lowest bids.