# More Formula help...

##### Well-known Member
Ok I have a cell that I need this function.

D2 will be the input cell and the formula will be in J2.

If D =1 then 4%
If D = 2 then 0%
If D =3 then 2% minimum \$60.00 and a maximum of \$120.00
If D =4 then 0%

### Excel Facts

To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.
Is this what you were looking for:
Code:
``Choose(D2,.04*A1,0,MIN(MAX(.02*A1,60),120),0)``

HTH,
~Gold Fish

Have a look at the CHOOSE function

lenze

Well I know this isn't right but something like this.

=IF(D2=1,4,"",IF(D2=2,0,"",IF(D2=3,MIN,60,MAX,120,IF(D2=4,0,""

I don't understand step 3 at all:
If D =3 then 2% minimum \$60.00 and a maximum of \$120.00

Do you want this cell to have a value of 2% or something else... and if so, where does the min and max come in? in your psudo-example you don't even include the 2%, so I'm a bit lost.

Actually I messed up.... All I need is this

If D2 =1 then 4%
If D2 = 2 then 0%
If D2 =3 then 2%
If D2 =4 then 0%

Actually I messed up.... All I need is this

If D2 =1 then 4%
If D2 = 2 then 0%
If D2 =3 then 2%
If D2 =4 then 0%

=INDEX({0.04,0,0.02,0},D2)

Replies
0
Views
104
Replies
12
Views
544
Replies
5
Views
185
Replies
5
Views
207
Replies
5
Views
170

1,217,676
Messages
6,137,934
Members
450,099
Latest member
Pushbutton

### 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.

### Which adblocker are you using?

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