Calculating my tax automatically in Excel - excel

It's my very first post here so hi all.
I did a lot of research before hand but couldn't find the answer I was looking for.
I want a spreadsheet in Google Sheets to automatically calculate my tax.
€0 - €11000 w/ 0%
€11000 - €18000 w/ 25%
€18000 - €31000 w/ 35%
€31000 - €60000 w/ 42%
€60000 - €90000 w/ 48%
€90000 - €1000000 w/ 50%
€1000000+ w/ 55%
So the first 11k are taxed with 0% the next 7k are taxed with 25% etc.
What I've had the following thought - give that F9 are my before tax earnings:
=IF(0<=F9<=11000,SUM(F9*0%),(IF(11000<F9<=18000,SUM((F9-11000)*25%),(IF(18000<F9<=31000,SUM((7000*25%)+((F9-18000)*35%),SUM(F9))))))
Unfortunately it just won't work.
Am I using the right function?
Is there anything out there which would make it much easier?
Thank you for your help.

Here is an example (Excel) for your problem:
In Cell A1 is your Money, paste the code in A2 for example:
=WENN(A1>10000;"10%";WENN(A1>7000;"7%";WENN(A1>5000;"5%";WENN(A1>3000;"3%";"0%"))))
FK

Excel does not work that way X<y<z. Plus it resolves in order so it is not necessary:
=IF(F9<=11000,SUM(F9*0%),(IF(F9<=18000,SUM((F9-11000)*25%),(IF(F9<=31000,SUM((7000*25%)+((F9-18000)*35%),SUM(F9))))))
if it is less than 11000 then the first will fire and none others. then if greater than 11000 but less than 18000 the second will fire, and so on.

List values of each bracket range with the percentage applied if it is above that amount, for example:
A B
1 11000 0.25
2 18000 0.35
3 31000 0.42
4 60000 0.48
5 90000 0.50
6 1000000 0.55
You can format the percentage values as percentages if you prefer. What is important is that the value is a decimal and not a string.
Then you can use the MATCH function to determine the row of the first value that is larger than your income. So if the cell holding your income is F9, you'd have:
=MATCH(F9;A1:A6;1)
But this only returns the row number. If we want to retrieve the tax applied, we'll need to use this to pinpoint the value in column B pertaining to that. To get a value pertaining at a certain point dynamically, we use INDEX.
So putting it together, you'd have:
=INDEX(B1:B6; MATCH(F9; A1:A6; 1); 1)
One minus this times the value in F9 to get the amount after taxes:
=F9*(1 - INDEX(B1:B6; MATCH(F9; A1:A6; 1); 1))
Why would you do it this way? It lets you change the values in an intuitive fashion without having to parse a long and arduous formula. You can also add new values with relative ease. Just remember to adjust the A1:A6 and B1:B6 ranges.
Good luck! Let me know how it turns out!

You might want to try this:
=if(F9<=0,"Error",IF(F9<=11000,0,(IF(F9<=18000,(F9-11000)*25%,(IF(F9<=31000,1750+(F9-18000)*35%,IF(F9<=60000,6300+(F9-31000)*0.42,if(F9<=90000,18480+(F9-60000)*0.48,IF(F9<=1000000,32880+(F9-90000)*0.5,487880+(F9-1000000)*0.55)))))))))

Related

Dynamic IRR calculation. Is there a way to add zeros after the terminal amount is added?

I am building out a dashboard that allows you to add in a disposal date and amount which will add the data to the current modelled cashflows and recalculate the IRR.
The issue I am having is trouble zeroing all of the cells after the new disposal date.
For example say we have the below data in excel we can use the XIRR function to calculate the IRR:
30/04/2021
31/05/2021
30/06/2021
31/07/2021
30/09/2021
31/10/2021
30/11/2021
31/12/2021
-10000
100
100
100
100
100
100
11000
This would give an IRR of ~27%.
I want to make this dynamic so that I can say bring the disposal date forward as so:
30/04/2021
31/05/2021
30/06/2021
31/07/2021
30/09/2021
31/10/2021
30/11/2021
31/12/2021
-10000
100
100
100
11000
0
0
0
This gives an IRR of ~37%.
I am looking for information on how best to add the data in and how to add zeros after the disposal amount has been added. So if I change the cell for disposal amount and date it will bring the value forward, as seen in table 2. It will then add zeros to all cells after the disposal amount.
Workaround
(no need to zero out anything with my proposed soln. - may save you duplicate resource in excel build... :)
Plug this into excel per screenshot below (b13):
=XIRR(B11:OFFSET(B11,0,MATCH(MAX(ABS(B11:I11)),ABS($B$11:$I$11),0)-1,1),B10:OFFSET(B10,0,MATCH(MAX(ABS(B11:I11)),ABS($B$11:$I$11),0)-1,1))
Screenshot
Shared OneDrive link: here
(update no pw, no expiry)

Allocation of shipments based on ranking (excel based solution)

I have got some list of shops. I have to allocate shipments based on their rankings. The allocation should happen in such a way that each shop should not get less than 25 shipments and more than 100 shipments. The actual question is explained below.
Total SHipments=150
Shop Id A B C D E
Allocation (%) 30% 28% 25% 10% 7%
Min. 25 25 25 25 25
Max. 100 100 100 100 100
Actual Allocation %*150
=45 42 37 15 11
My Requirement 45(>25) 42(>25) 37(>25) 25(<25) 1(<25)
So my requirement is based on the ranking, the excel should allocate actual allocation to the top rankers (Between 25 to 100) and as the ranking goes down, it should fulfil the need of better ranker and make it 25 and then allocate the rest.I think I have made the question clear but let me know if still ambiguity is there. I'm new to this community. Forgive me if I'm not able to post the question in proper way.
To get your required results based on the information in your table layed out in the manner in the screen shot below, use the following formula:
=INT(MIN(MAX($C$1*B$5,B$7),B$9))
The above formula is placed in Cell B16. The INT was used as your results for 37.5 was 37.
In cell C16 place the following formula and copy it to the right as required. This is based on the allocation being in descending order from left to right:
=IF(SUM($B$16:B$16)+INT(MIN(MAX($C$1*C$5,C$7),C$9))<=$C$1,INT(MIN(MAX($C$1*C$5,C$7),C$9)),$C$1-SUM($B$16:B$16))
The max function is used to return the minimum value. When your formula returns a result below the minimum value The max function returns the minimum value. The MIN function does the same when the result of the formula exceeds the maximum allowable value. It will return the maximum allowed value as it is the minimum of the two numbers.
UPDATE: Rank out of order
This does not work when their is a tie and total demand exceeds available shipments
I took your table and added a helper row to determine RANK Row 6. I used the following formula to come up with the rank
=RANK(B5,$B$5:$F$5)
With this method, it is possible to have ties. You can investigate how to come up with unique rank with ties. The rest of this solution will assume the there are no ties in rank.
In Row 11 the "demand" of each shop is calculated based on Max and Min constraints and is rounded down to the nearest integer. The following formula is placed in B11 and copied right:
=ROUNDDOWN((MAX(MIN(B5*$C$1,B9),B7)),0)
In row 13 the actually amount to ship or "supply" is determined with the following formula in B13 and copied to the right.
=IF(SUMPRODUCT(($B$6:$F$6<=B6)*$B$11:$F$11)<=$C$1,B11,MAX($C$1-SUMPRODUCT(($B$6:$F$6<=(B6-1))*$B$11:$F$11),0))
FYI - SUMPRODUCT performs array like calculations within it. As a result, avoid using full column/row references such as A:A and instead reduce the range to your data or something closer to it to avoid a lot of excess calculation which may bog down your system. This is particularly true when the formula is repeated in multiple cells.

Anyway of creating a random data set between two values that fluctuates between 1-5% each interval?

I need to create a data set of 750 data points that need to be between 100 and 130 but the value needs to move at least 1-5% each time and end at 130.
This is to represent the volatility of a share price over 3 trading years so has to show the natural rise and fall of a share price.
Any help would be much appreciated.
This might start you off:
Cell A1 just has a max() function, the formula in A4 is :
=RANDBETWEEN(100,125)*1+RANDBETWEEN(1,4)+RANDBETWEEN(1,10)/10
Just drag down as far as...

Multiplying an amount by 0.45 up until 833 then the remain by 0.25

Fairly new to excel and its not something i would usually go into too much detail with, i used simple formula to get what little i need to do on it.
However, recently i have found myself using it abit more. I currently use excel to monitor and track my mileage for work as it requires me to travel as im a field engineer.
I have a sheet for each month which im using and then its all linked back to a quick summary page.
On this summary page i have the amount of miles ive currently remaining to hand in (hand in mid way each month).
What i want to be able to do is calculate how much i will be getting back.
The calculation is pretty straight forward however i dont know how to make it work in excel.
I need to be able to be able to multiply the amount by 0.45 up until 833. Then anything remaining after 833 gets multiplied by 0.25.
Example would be 1000 miles.
1000-833 = 167
833 * 0.45 = 375.85
167 * 0.25 = 41.75
375.85 + 41.75 = 417.60
Now this might be easy in that i could just subtract 833 from the amount and then multiple the remainer by 0.25 and add it like i did above. However the problem is, what if i dont do 833 miles that month. say i do 600?
Not really sure how to even approach this. If anyone could give me a hand, even if not the formula a way to approach this? im really new to excel so i dont know if you can use if statements as if i could i could just say if the amount is above 833 minus 833 from it else * 0.45. I just dont know if excel allows me to do this.
Any help would be greatly appreciated!
The formula should be:
=MAX(A1-833,0)*0.25 + MIN(833,A1)*0.45
Basically, subtract 833 from A1. If it's greater than zero, multiply that difference by 0.25.
Then, if A1 is less than 833, multiply A1 by 0.45 If it's greater than 833, multiply 833 by 0.45.
With a value in A1, in another cell enter:
=IF(A1<=833,A1*0.45,375.85+0.25*(A1-833))
I guess the below formula will also help you if you track Miles that you travelled by Day.
=IF((SUM(B:B)>833),(((SUM(B:B)-833)*0.25)+(833*0.45)),(SUM(B:B)*0.45))
In this case, just B:B is the entire column of Miles you are tracking by day.
Thanks!

excel if statement having a range in a single cell

At the moment I am working on using on implementing nested if statement in excel for a project. It involves calculating the tax of employees using a tax table and would like to know if it possible for a logical test to distinguish a range within a singular cell i.e $0-$18,000
If you are open to using VLOOKUP, you can create a table showing the range and the associated value with it and use vlookup with the last argument being TRUE (approximate match) to get the value.
This is the output:
1.00 10%
100,000.00 30%
40,000.00 25%
17,999.00 10%
18,000.00 10%
18,001.00 15%
Try nested IF and AND formulas in combination. For example, there are three ranges: 0-18 000, 18 000- 23 000, 23 000<, then use this:
=IF(AND(A1>=0, A1<=18000),"range 1",IF(AND(A1>18000, A1<=23000),"range 2","range 3"))

Resources