Need help with excel formula

mangoni

New Member
HI-I NEED A FORMULA THAT WILL CALCULATE THE FOLLOWING COMMISSIONS FOR EACH LINE...

If sales are 5,000,000 to 6,000,000 = 2.5%
If sales are 6,000,000 to 6,500,000 = 3.0%
If sales are 6,500,000 to 7,000,000 = 3.5%
If sales are 7,000,000+ = 4%

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK

NeonRedSharpie

Well-known Member
Hold down on the excitement there buddy...
Code:
``=IF(\$A1>=7000000,4%,IF(\$A1>=6500000,3.5%,IF(\$A1>=6000000,3%,IF(\$A1>=5000000,2.5%,0))))``

Scott Huish

MrExcel MVP
Have a look at the VLOOKUP function.

What do you want to do if the sales are less than 5 million?

bbott

Well-known Member
Maybe:

=CHOOSE(IFERROR(MATCH(A1,{7000000,6500000,6000000,5000000,4999999},-1),1),0.04,0.035,0.03,0.025,0)*A1

New Member
=IF(AND(A1>=5000000,A1<=6000000),0.025,IF(AND(A1>=6000001,A1<=6500000),0.3,IF(AND(A1>=6500001,A1<=7000000),0.035,IF(A1>7000000,0.04,"outside range"))))

The last part of the formula says "outside range" if the value of A1 is less than 5,000,000 but you can adjust it to be whatever you'd like.

NeonRedSharpie

Well-known Member
=IF(AND(A1>=5000000,A1<=6000000),0.025,IF(AND(A1>=6000001,A1<=6500000),0.3,IF(AND(A1>=6500001,A1<=7000000),0.035,IF(A1>7000000,0.04,"outside range"))))

The last part of the formula says "outside range" if the value of A1 is less than 5,000,000 but you can adjust it to be whatever you'd like.

Fun trick, when doing things like this, always start with the criteria that will only be met once. You included the less than/greater than option, but you don't need the less than. You can sort descending values and only use the greater than.

It's like a case statement in excel/sql. Once a condition is met, it skips the remaining options. No item can be both >7,000,000 and under anything else. So anything over 7,000,000 is attributed a value and skipped.

The same for 6,500,000. If an item is over 6,500,000 AND over 7,000,000, it has already been assigned to the 7,000,000 value!

Replies
2
Views
409
Replies
6
Views
268
Replies
3
Views
319
Replies
0
Views
157
Replies
3
Views
520

1,196,017
Messages
6,012,867
Members
441,737
Latest member
bijayche

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.

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

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