Function Problems

Simplify an Excel Rate Lookup with XLOOKUP or VLOOKUP

Khadija KhanKhadija Khan Dec 2, 2026 869 views

Question details

Retrieve a rate from a Rates worksheet using an exact or closest lower match, with a special rate for ETAPA.

Simplify an Excel Rate Lookup with XLOOKUP or VLOOKUP
Product
Microsoft Excel
Device & OS
not provided
Scenario
A worksheet needs to look up the value in F5 against thresholds in Rates column A and return the corresponding rate from column C.
Observed behavior
The desired result is the rate for an exact or next lower threshold, or 2% when B53 contains ETAPA.
Before you start

Check that Rates!A3:A50 contains numeric thresholds and Rates!C3:C50 contains their corresponding rates. Confirm that F5 is the lookup value and B53 holds the category to check for ETAPA.

Solution 1Recommended

Use XLOOKUP for an exact or next lower rate

Use this formula in Microsoft 365 or Excel 2021 to find a rate without sorting the lookup range.

1
Enter the lookup formula

Select J5 and enter =XLOOKUP(F5,Rates!$A$3:$A$50,Rates!$C$3:$C$50,"",-1). The -1 match mode returns an exact match or the next lower threshold.

2
Add the ETAPA condition

If ETAPA must always return 2%, replace the formula in J5 with =IF($B$53="ETAPA",2%,XLOOKUP(F5,Rates!$A$3:$A$50,Rates!$C$3:$C$50,"",-1)).

3
Fill and format

Drag the fill handle from J5 down the result column, then use Home > Number > Percent Style if the results should appear as percentages.

Use XLOOKUP for an exact or next lower rate
No lower threshold: The XLOOKUP formula returns a blank if no exact or lower threshold exists. Extend both Rates ranges if you add rows beyond row 50.
Rate lookup in WPS Spreadsheets

Look up threshold rates in WPS Spreadsheets

Use VLOOKUP in WPS Spreadsheets to return the rate for an exact or closest lower threshold and apply the ETAPA exception.

  1. 1. Open the workbook: Open the Excel workbook in WPS Spreadsheets and select the Rates worksheet.
  2. 2. Sort the thresholds: Select the rate table in columns A through C and use Data > Sort to arrange column A from smallest to largest.
  3. 3. Enter the rate formula: Return to the results sheet, select J5, and enter =IF($B$53="ETAPA",2%,IFERROR(VLOOKUP(F5,Rates!$A$3:$C$50,3,TRUE),"")).
  4. 4. Fill and save: Drag the fill handle down from J5, format the results as percentages if needed, and use File > Save to save the workbook.
Find rates from an ascending threshold tableApply a fixed 2% rate for ETAPAOpen and edit Microsoft Excel XLSX filesUse familiar spreadsheet formulas and formatting tools
microsoft office alternative - wps office

Frequently Asked Questions

What does the -1 in the XLOOKUP formula do?

It sets the match mode to return an exact match or, if none exists, the next smaller value in Rates!A3:A50.

Why does VLOOKUP need the Rates table sorted?

With TRUE as its last argument, VLOOKUP uses an approximate match and expects the first column of the selected range to be sorted from smallest to largest. Select the full table and use Data > Sort.

Why is the formula returning a blank?

If F5 is below the smallest threshold, there is no exact or lower match. The XLOOKUP formula returns a blank for a missing match, while the VLOOKUP formula uses IFERROR to hide lookup errors.

What happens if I add rates below row 50?

Update the formula ranges to include the new rows. For XLOOKUP, extend both the lookup and return ranges by the same number of rows; for VLOOKUP, extend the table range.

Does the ETAPA condition change when I fill the formula down?

No. The reference $B$53 is absolute, so every filled formula checks B53. The F5 reference changes to F6, F7, and so on.