Forum Discussion

shamilton35's avatar
shamilton35
Copper Contributor
Jan 29, 2024
Solved

Which Formula should I use?

Which formula should i use to give me a value from multiple ranges. For example, we charge fees based on size. If it is a range from 1001-2000, we will charge 35.00. If 2001-3000, we will charge 45.0...
  • HansVogelaar's avatar
    Jan 29, 2024

    shamilton35 

    I'd create a range with thresholds and the corresponding charges. In the screenshot below, it is G2:H5.

    You can then use XLOOKUP (or VLOOKUP in older versions of Excel).

    The formula in B2 is

    =XLOOKUP(A2,$G$2:$G$5,$H$2:$H$5,"",-1)