Function Problems

Use Excel VLOOKUP or XLOOKUP for Location-Based Rates

Maira MehtabMaira Mehtab Dec 2, 2026 869 views

Question details

Return a percentage or billing rate based on a location selected from a drop-down list.

Use VLOOKUP or XLOOKUP for Location-Based Rates in Excel
Product
Microsoft Excel
Device & OS
not provided
Scenario
A worksheet needs to use a different rate for each location without a complex nested IF formula.
Observed behavior
Selecting a location should return its matching rate for use in a calculation.
Before you start

Gather the locations and their applicable rates, and make sure the drop-down values match the location names in the lookup table. Enter percentage rates as percentages, such as 5%, rather than as whole numbers.

Solution 1Recommended

Use XLOOKUP with a named Excel table

Use this method if your version of Excel supports XLOOKUP and you want an easy-to-read formula.

1
Create the rate table

Enter Location and Rate as column headers, then list each location and its actual rate below them. Select the range and choose Insert > Table.

2
Name the table

Click inside the table and use Table Design > Table Name to name it Rates. Keep the column headers Location and Rate.

3
Look up the selected location

If the drop-down is in B11, enter =XLOOKUP(B11,Rates[Location],Rates[Rate],"") in the cell where you want the rate to appear, such as O17. The formula returns a blank if no location matches.

4
Calculate a total

For a percentage added to the amount in N17, enter =IF(O17="","",N17*(1+O17)) in the total cell. For a billing rate per unit, multiply the quantity by the returned rate instead.

Use XLOOKUP with a named Excel table
Check your Excel version: XLOOKUP is not available in Excel 2016 or Excel 2019. Use the VLOOKUP method if your version does not support it.
Work with location-based rates

Look up location rates in WPS Spreadsheet

Use a location list and VLOOKUP in WPS Spreadsheet to return the rate associated with a drop-down selection and use it in a calculation.

  1. 1. Open the workbook: Open WPS Spreadsheet and choose Open to select your Excel workbook.
  2. 2. Enter location rates: In the worksheet, enter locations in H2:H5 and their corresponding rates in I2:I5, adjusting the range for your list.
  3. 3. Add the lookup formula: With the selected location in B11, enter =IFERROR(VLOOKUP(B11,$H$2:$I$5,2,FALSE),"") in O17 to return its rate.
  4. 4. Calculate and save: For a percentage added to N17, enter =IF(O17="","",N17*(1+O17)) in the total cell. Choose Menu > Save or Save As to save the workbook.
Replace nested IF formulas with a location-to-rate lookup.Open and edit Microsoft Excel XLSX and XLS files.Use a familiar spreadsheet interface to maintain rates and formulas.Update rates in one lookup range rather than in multiple formulas.
microsoft office alternative - wps office

Frequently Asked Questions

How do I create a location drop-down in Excel?

Select the input cell, choose Data > Data Validation, and select List. Set the source to the cells containing your location names, then click OK.

Why does my lookup return a blank?

The selected location may not match an entry in the lookup table, or the lookup range may not include it. Check spelling, extra spaces, and the range referenced in the formula.

Should I use XLOOKUP or VLOOKUP?

Use XLOOKUP if your Excel version supports it and you want separate lookup and return columns. Use VLOOKUP for older versions, with locations in the first column of the lookup range.

How do I apply a returned percentage to an amount?

If N17 contains the base amount and O17 contains a percentage such as 5%, use =N17*(1+O17) to add the percentage. For a per-unit billing rate, multiply the rate by the quantity instead.