# Need help with a formula

#### cummingsea

##### Active Member
On a spreadsheet in cell J7 I have the amount of \$5760, I need a formula that will look at cell J7 and tell me that if J7 is between the amount of \$2946 and \$5575 then it will subtract \$2946 from J7 and give me a result of \$185, then I will most likely have to nest the formula to say if J7 is between \$5575 and \$8465 then subtract \$5575 from J7 and give me the result of \$2890.
Thank a Million for all time and help
Eugene Cummings

### Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes

#### bymaster

##### New Member
Could this be what you are looking for??

=IF(AND(J7>=2946,J7<=5575),J7-2946,IF(AND(J7>=5576,J7<=8465),J7-5575,J7))

-HTH

#### cummingsea

##### Active Member
Perfecto, works like clock work
Once again thanks a million
Eugene Cummings

#### cummingsea

##### Active Member
The function above provided by bymaster works, but when I add more information to it and hit the enter key I get a message that say's YOU'VE ENTERED TOO MANY ARGUMENTS FOR THIS FUNCTION.
The function need to repeat 7 times.
Thanks again for all your help and time.

#### cummingsea

##### Active Member
Sorry my F up it work fine
Eugene Cummings

Replies
9
Views
173
Replies
3
Views
376
Replies
9
Views
356
Replies
1
Views
126
Replies
1
Views
158

1,190,783
Messages
5,982,895
Members
439,805
Latest member
IDarkstarX

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