Forum Discussion
shamilton35
Jan 29, 2024Copper Contributor
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...
- Jan 29, 2024
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)
samarmesto
Jan 29, 2024Copper Contributor
Hello shamilton35
Maybe it could be:
=IF((A1>=1001)*AND(A1<=2000),35,IF((A1>=2001)*AND(A1<=3000),45,"There are not values"))
A1 is the cell where are the values.