Calculate Monthly Function Costs with a Price Lookup in Excel
Question details
Find each function's fixed price on another worksheet and multiply it by the quantity entered for the month.

- Product
- Microsoft Excel
- Device & OS
- not provided
- Scenario
- An employee enters monthly quantities for functions whose fixed prices are stored in a separate lookup table.
- Observed behavior
- Each monthly row should calculate its cost from the matching function price and quantity, regardless of the order of functions.
Check that function names match between the monthly sheet and the price list, and that prices and quantities are numeric. Make sure each function has only one price entry.
Use XLOOKUP with Excel tables
Use structured references to calculate each row's cost when XLOOKUP is available.
On the price worksheet, enter Function and Price as column headers. Select the list, choose Insert > Table, and name the table Prices on the Table Design tab.
On the monthly worksheet, enter Function, Quantity, and Monthly Cost as headers. Select the data and choose Insert > Table.
In the first data cell under Monthly Cost, enter =IFERROR(XLOOKUP([@Function],Prices[Function],Prices[Price])*[@Quantity],"").
Enter a function name and quantity in the monthly table. Check that Excel fills the formula down the Monthly Cost column and returns the expected cost.

Use VLOOKUP when XLOOKUP is unavailable
Use an exact-match lookup against a fixed price range in an older Excel version.
Look Up Function Prices in WPS Spreadsheet
Use an exact-match VLOOKUP formula in WPS Spreadsheet to retrieve prices from a separate worksheet and calculate each monthly cost.
- 1. Create the price list: In WPS Spreadsheet, add a worksheet named Price List. Enter function names in column A and prices in column B, starting in row 2.
- 2. Enter monthly quantities: On the monthly worksheet, enter function names in column A and quantities in column B.
- 3. Calculate the costs: In C2, enter =IFERROR(VLOOKUP(A2,'Price List'!$A$2:$B$100,2,FALSE)*B2,""). Adjust the lookup range if the price list extends beyond row 100.
- 4. Copy the formula: Drag the fill handle from C2 down column C, then check a result against its price and quantity.

Frequently Asked Questions
Will the lookup work if functions appear in a different order each month?
Yes. XLOOKUP matches the function name, and VLOOKUP with FALSE finds an exact match, so the monthly rows do not need to follow the price list's order.
Why is my monthly cost cell blank?
IFERROR returns a blank when the lookup or multiplication produces an error. Check that the function name matches the price list and that the price and quantity are numeric.
What happens if a function appears twice in the price list?
XLOOKUP and an exact-match VLOOKUP return the first matching price. Keep one price per function or revise the lookup criteria if multiple prices are needed.
How can I add up all monthly costs?
Below the calculated costs, enter a SUM formula such as =SUM(C2:C100), adjusting the range to cover the rows on your monthly sheet.




