Function Problems

Calculate Monthly Function Costs with a Price Lookup in Excel

Jason MillerJason Miller Nov 18, 2026 870 views

Question details

Find each function's fixed price on another worksheet and multiply it by the quantity entered for the month.

Calculate Monthly Function Costs with a Price Lookup in Excel
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.
Before you start

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.

Solution 1Recommended

Use XLOOKUP with Excel tables

Use structured references to calculate each row's cost when XLOOKUP is available.

1
Create the price table

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.

2
Create the monthly table

On the monthly worksheet, enter Function, Quantity, and Monthly Cost as headers. Select the data and choose Insert > Table.

3
Enter the lookup formula

In the first data cell under Monthly Cost, enter =IFERROR(XLOOKUP([@Function],Prices[Function],Prices[Price])*[@Quantity],"").

4
Check the results

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 XLOOKUP with Excel tables
Blank results: IFERROR returns a blank for an unmatched function or another formula error. If a result is unexpectedly blank, check the function name, quantity, and price.
Calculate monthly costs in WPS

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. 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. 2. Enter monthly quantities: On the monthly worksheet, enter function names in column A and quantities in column B.
  3. 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. 4. Copy the formula: Drag the fill handle from C2 down column C, then check a result against its price and quantity.
Match function names to fixed prices regardless of their orderCalculate monthly row costs from employee-entered quantitiesOpen and save Microsoft Excel XLSX spreadsheetsUse a familiar spreadsheet interface
microsoft office alternative - wps office

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.