Forum Discussion
spamitovic
Jul 03, 2022Copper Contributor
Search correspondance and calculate
Hi members,
I have a table where I list the tax value for a slice of salary:
Min. | Max. | Tax |
0 | 30000 | 0% |
30001 | 50000 | 10% |
50001 | 60000 | 20% |
60001 | 80000 | 30% |
80001 | 180000 | 34% |
180001 | or more | 38% |
Now I would like to calculate the annual salary, and based on the result, I should use vlookup function to search where the annual salary is situated and select the correct tax.
For example: If the annual salary is 45500, the selected tax should be 10%
But I try to mix VLOOKUP function with MIN and MAX functions but it doesn't work or just I don't know how to do it.
The result should be like that:
Salary/Month | Tax |
1500,00 | 0% |
1000,00 | 0% |
2800,00 | 10% |
2500,00 | 10% |
3000,00 | 10% |
2800,00 | 10% |
spamitovic Please see attached. I used LOOKUP rather than VLOOKUP. If you are on a modern Excel version, consider XLOOKUP.
By the way, I believe a monthly salary of 2500 (i.e. 30000/year) should result in 0%, in stead of 10% in your example.
- Riny_van_EekelenPlatinum Contributor
spamitovic Please see attached. I used LOOKUP rather than VLOOKUP. If you are on a modern Excel version, consider XLOOKUP.
By the way, I believe a monthly salary of 2500 (i.e. 30000/year) should result in 0%, in stead of 10% in your example.
- spamitovicCopper ContributorBest answer. Thank you.
Yes a monthly salary of 2500 should result in 0%.