Multiply Value if falls between 2 values

foustus82

Board Regular
Joined
Jan 6, 2014
Messages
60
I'm looking to see what formula I could create that would multiple two cell's values together if the value in cell 1 falls between a set range of numbers.

So,

(Assume the formula would reside in cell C1)

If Cell A1 = 0 to 20,000, then multiply A1 by value in B1
If Cell A1 = 20,001 to 25,000, then multiply A1 by value in B2
If Cell A1 = 25,001 to 35,750, then multiply A1 by value in B3

And so on.

Any thoughts?
 

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.
I'm looking to see what formula I could create that would multiple two cell's values together if the value in cell 1 falls between a set range of numbers.

So,

(Assume the formula would reside in cell C1)

If Cell A1 = 0 to 20,000, then multiply A1 by value in B1
If Cell A1 = 20,001 to 25,000, then multiply A1 by value in B2
If Cell A1 = 25,001 to 35,750, then multiply A1 by value in B3

And so on.

Any thoughts?

Try...

=LOOKUP(A1,{0,20001.25001},B1:B3)*A1
 
Upvote 0
Is there a way to nest lookups? I need the value in Cell A1 to be matched to the appropriate number range (I have 6 number ranges in all)


Here are the ranges:

$0.00 $20,000.00
$20,001.00 $30,000.00
$30,001.00 $37,500.00
$37,501.00 $45,000.00
$45,001.00 $50,000.00
$50,001.00 $100,000.00

Each range has a corresponding percentage that is paid. So, for example, if a month's sales fell between the first range ($0 to $20k), then one would earn x% in commission. So, the monthly sales total is what is in Cell A1 (for our example). That total is obviously dynamic based on what is sold. So, the formula would need to take the month-end total, then look up that value in the 6 ranges I have and see which range it falls in and thereby, multiply it by the commission rate for that particular range.

So, if the month-end sales total was 47,800.00, then the formula would run 47,800.00 against the ranges and see that it falls in the range that is 45,001.00 to 50,000.00 and then would multiply it by the corresponding commission rate for that range. Nothing mathematically needs to be done with the ranges, they are just my "look up boundaries."

Sorry of I'm being confusing.
 
Upvote 0
This is the table and VLOOKUP formula that I would use.

*ABCDE
1Total SalesCommission***
2$0.011.0%*My Sales$30,000.00
3$20,000.012.5%*My Commission2.5%
4$30,000.015.0%***
5$37,500.017.5%***
6$45,000.0110.0%***
7$50,000.0112.5%***
8$100,000.0115.0%***

<colgroup><col style="width:30px; "><col style="width:78px;"><col style="width:83px;"><col style="width:20px;"><col style="width:106px;"><col style="width:78px;"></colgroup><tbody>
</tbody>

Spreadsheet Formulas
CellFormula
E3=VLOOKUP(E2, $A$2:$B$8, 2)

<tbody>
</tbody>

<tbody>
</tbody>
 
Upvote 0
This is the table and VLOOKUP formula that I would use.

*
A
B
C
D
E
1
Total Sales
Commission
*
*
*
2
$0.01
1.0%
*
My Sales
$30,000.00
3
$20,000.01
2.5%
*
My Commission
2.5%
4
$30,000.01
5.0%
*
*
*
5
$37,500.01
7.5%
*
*
*
6
$45,000.01
10.0%
*
*
*
7
$50,000.01
12.5%
*
*
*
8
$100,000.01
15.0%
*
*
*

<TBODY>
</TBODY>

Spreadsheet Formulas
Cell
Formula
E3
=VLOOKUP(E2, $A$2:$B$8, 2)

<TBODY>
</TBODY>


<TBODY>
</TBODY>

Change A2 to $0.00 for convenience.

In E3 enter, whichever you prefer...

=VLOOKUP(E2,$A$2:$B$8,2,1)*E2

=LOOKUP(E2,$A$2:$A$8,$B$2:$B$8)*E2

=INDEX($B$2:$B$8,MATCH(E2,$A$2:$A$8,1))
 
Upvote 0

Forum statistics

Threads
1,217,310
Messages
6,135,775
Members
449,963
Latest member
ethanong89

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top