Choose the Lowest-Cost Supplier with an Excel Allocation Formula
Question details
Select the lowest-cost eligible supplier and fill allocation cells with that supplier's item prices.
- Product
- Microsoft Excel
- Device & OS
- not provided
- Scenario
- An allocation worksheet needs prices from another table when multiple suppliers can provide the required items.
- Observed behavior
- The allocation should use one supplier for the required group of items, choosing the eligible supplier with the lowest total cost.
Identify the supplier names, item-price columns, and destination cells in your worksheet. Confirm that unavailable items are blank and available prices are numeric; the example below treats a numeric zero as an available price.
Compare eligible supplier totals and return their prices
Use helper totals and lookup formulas when one supplier must provide all three required items.
This example assumes supplier names are in A2:A100 and the three required item prices are in C2:E100. Column F is available for totals, and row 102 is available for the result. Adjust the references to match your worksheet.
Only suppliers with numeric prices for all three items qualify. If additional sequence or eligibility rules apply, incorporate them into the total formula before comparing suppliers.
In F2, enter =IF(COUNT(C2:E2)=3,SUM(C2:E2),"") and fill the formula down through F100. A supplier missing any of the three prices receives a blank total.
In F102, enter =IF(COUNT(F2:F100)=0,"",INDEX(A2:A100,MATCH(MIN(F2:F100),F2:F100,0))). The cell remains blank if no supplier qualifies.
In C102, enter =IF(COUNT($F$2:$F$100)=0,"",INDEX(C$2:C$100,MATCH(MIN($F$2:$F$100),$F$2:$F$100,0))) and copy it across through E102. Each cell returns a price from the same lowest-cost supplier.
Compare the total in column F for the selected supplier with the other eligible totals. For example, an eligible supplier totaling $31,199 is selected over one totaling $34,957.

Build the supplier allocation in WPS Spreadsheets
Use WPS Spreadsheets to calculate eligible supplier totals and return prices from the lowest-cost supplier using familiar spreadsheet formulas.
- 1. Open the workbook: Open WPS Spreadsheets and select Open to load your Excel workbook.
- 2. Calculate supplier totals: With names in A2:A100 and required prices in C2:E100, enter =IF(COUNT(C2:E2)=3,SUM(C2:E2),"") in F2 and fill it down through F100.
- 3. Identify the lowest-cost supplier: In F102, enter =IF(COUNT(F2:F100)=0,"",INDEX(A2:A100,MATCH(MIN(F2:F100),F2:F100,0))).
- 4. Return the item prices: In C102, enter =IF(COUNT($F$2:$F$100)=0,"",INDEX(C$2:C$100,MATCH(MIN($F$2:$F$100),$F$2:$F$100,0))) and copy it through E102. Adjust the ranges if your workbook uses different cells.

Frequently Asked Questions
How does the formula exclude suppliers missing an item?
The helper formula checks COUNT(C2:E2)=3 before adding the prices. If any of the three cells is blank or nonnumeric, it returns a blank total.
What happens if two suppliers have the same lowest total?
MATCH returns the first matching total in F2:F100, so the supplier appearing first in the table is selected. Add a separate tie-breaking rule if another supplier should take priority.
Can orange juice come from a different supplier?
Yes. The example selects one supplier for the three prices in columns C through E. Use a separate allocation rule for orange juice if it is outside that required group.
Why is the supplier result blank?
Check the prices in C2:E100 and the helper formulas in F2:F100. If no row contains three numeric prices, COUNT(F2:F100) is zero and the result remains blank.




