Formula for a homework question

Bmaho

New Member
Joined
Sep 6, 2017
Messages
13
If net income is at least $15,000 and at most $35,000, taxes paid are 28% of income above $15,000,
else, If net income is less than $15,000 then taxes paid are 15% of income above $8,000.
else, If net income is greater than $35,000, taxes paid are 33% of income above $35,000
B22 is cell reference for net income
Below is my formula, what am I doing wrong?
IF(AND((B22<=15000,B22>=35000), 0.28*(B22-15000), IF(B22<15000), 0.15*(B22-8000), IF(B22>35000), 0.33*(B22-35000))

Thank you for any advice!
 

Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.
Couple of points

1) Your first condition in formula is checking for value which is less than 15000 and greater than 35000 simultaneously which will never hold true
2) For second and third if you have closed brackets prematurely
3) You have not taken in to consideration what if the income is less than 8000 , In such case your formula will show -ve values as outcome. Assuming on income less than 8000 there will be no tax , I have modified your formula as below

=IF(AND(B22>=15000,B22<=35000), 0.28*(B22-15000), IF(B22<15000,MAX( 0.15*(B22-8000),0), IF(B22>35000, 0.33*(B22-35000),"")))

Just let me know if you are getting the desired result or not.

Thanks
Swapnil Shah
 
Last edited:
Upvote 0
Try This
Code:
=MAX(IF(AND(B22>=15000,B22<=35000),0.28*(B22-15000),IF(B22<15000,0.15*(B22-8000),IF(B22>35000,0.33*(B22-35000)))),0)
 
Upvote 0
OP is a learner - this is his/her homework, they should sketch out the scenarios on paper and build a formula from there. They learn little if they just copy post #3 .
Have they ever used the "AND" function. Are they familiar with "IF". I assume so from OP's first attempt.
 
Upvote 0
37000
If net income is at least $15,000 and at most $35,000, taxes paid are 28% of income above $15,000,
else, If net income is less than $15,000 then taxes paid are 15% of income above $8,000.
else, If net income is greater than $35,000, taxes paid are 33% of income above $35,000
B22 is cell reference for net income
080000%
8001to1499915%max6999*.151049.85
15000to3500028%plus line abovemax20001*.285600.28
35001tounlimited35%plus both lines above6650.13
so the formula now is simple and understandable
so for 37000 in A17310.13
=IF(A1<8001,0,IF(A1<15000,(A1-8000)*0.15,IF(A1<35000,1049.85+(A1-15000)*0.28,6650.13+(A1-35000)*0.33)))

<colgroup><col span="17"></colgroup><tbody>
</tbody>
 
Upvote 0
Thank you for your help with this question, and I'm sorry it took so long to get back to you. I didn't realize that there were so many solutions that would come up with the correct answer, which makes understanding excel that much more confusing. I tried all of the formulas and advice people gave me and they all worked. Thanks again everyone!

Brian
 
Upvote 0

Forum statistics

Threads
1,215,030
Messages
6,122,762
Members
449,095
Latest member
m_smith_solihull

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