logo
search
Function Problems

How to Calculate Fees from Numeric Ranges in Excel

Algirdas JasaitisAlgirdas Jasaitis Oct 22, 2026 868 views

Question details

The user needs to automatically calculate and return a fee based on an entered numeric amount using a lookup table, supporting both fixed fees and a final percentage-based fee.

How to Calculate Fees from Numeric Ranges in Excel
Product
Excel
Device & OS
not provided
Scenario
Automating the calculation of tiered fees, commissions, or shipping costs based on numeric thresholds.
Observed behavior
Returns a specific fixed fee depending on the numeric range of the input amount, and dynamically applies a percentage calculation if the amount exceeds the highest threshold.
Before you start

Ensure that your fee thresholds are organized in ascending order in your lookup table. This is required for the VLOOKUP function to correctly perform an approximate match for numeric ranges.

Solution 1Recommended

Use VLOOKUP for Fixed Fees Based on Ranges

Create a two-column lookup table and use the VLOOKUP function to quickly return the correct fixed fee for any given amount.

The VLOOKUP function is ideal for categorizing continuous numeric amounts into specific fee brackets. By setting the range lookup argument to TRUE (or omitting it), VLOOKUP performs an approximate match, finding the largest value that is less than or equal to your input amount.

1
Create a lookup table

Set up a two-column table (for example, in cells I2:J6). Enter your minimum threshold amounts in the first column and the corresponding fixed fees in the second column.

2
Select the result cell

Click on the cell where you want the calculated fee to appear (e.g., cell B2 next to your input amount in A2).

3
Enter the VLOOKUP formula

Type the formula `=IF(A2="","",VLOOKUP(A2,$I$2:$J$6,2))` and press Enter. The IF function ensures that the cell remains blank if no amount has been entered yet.

4
Fill the formula down

Click the bottom-right corner of the cell containing your formula and drag the fill handle down to apply it to the rest of your data column.

Use VLOOKUP for Fixed Fees Based on Ranges
Absolute References: Notice the dollar signs ($) in the table array ($I$2:$J$6). These absolute references lock the table range so it doesn't shift when you copy the formula down to other rows.
Smart Spreadsheet Solutions

Easily Calculate Range-Based Fees with WPS Spreadsheet

WPS Spreadsheet provides full support for advanced lookup functions like VLOOKUP and IF, allowing you to seamlessly calculate tiered fees, commissions, and dynamic pricing without hassle.

  1. 1. Open your dataset: Launch WPS Spreadsheet and open your workbook containing the sales or fee amounts.
  2. 2. Create your reference table: Input your numeric thresholds and corresponding fee values into an empty section of your sheet.
  3. 3. Apply the lookup formula: Use the Formula tab or directly type `=VLOOKUP()` to automatically assign fees to your entire dataset in seconds.
Fully compatible with Microsoft Excel formulas, functions, and file formats (.xlsx).Built-in function wizard to help you easily construct complex IF and VLOOKUP formulas without memorizing syntax.Lightweight, fast, and completely free to use for your daily financial and data calculations.
QA img-9

Frequently Asked Questions

Why does my VLOOKUP formula return an #N/A error?

This usually happens if the lookup value (your input amount) is smaller than the lowest threshold in your lookup table. Ensure your input amount is greater than or equal to the very first value in your reference range.

Do my lookup table values need to be sorted?

Yes, when using VLOOKUP for range lookups (which uses an approximate match), the first column of your lookup table must be sorted in ascending order from smallest to largest. Otherwise, the formula will return incorrect fees.

How do I prevent the formula from showing 0 or #N/A when the cell is empty?

You can wrap your formula in an IF statement to check for blanks, such as `=IF(A2="","", VLOOKUP(A2,$I$2:$J$6,2))`. This instructs the software to return a blank string instead of triggering a calculation if no amount is entered.

Can I use XLOOKUP instead of VLOOKUP for calculating fees?

Yes, if your software supports it, you can use XLOOKUP with the match mode argument set to '-1' (exact match or next smaller item). This achieves the same tiered result but doesn't strictly require the threshold data to be sorted.