Dashboards
August 20, 2022
I need help from one of you talented programmers to developing a generic formula to calculate taxes (Cell H17) from a progressive tax table given the year (Cell H15) and adjusted gross income (Cell H16). I have included a sample spreadsheet along with some answers and specific formulas using a XLOOKUP function but would like to be able to just specify the year and adjusted gross income and have it go to the tax table and calculate the tax. The Excel file name is Calculated Tax.xlsm which I believe I uploaded correctly.
I'm trying to avoid a formula using nested "if conditions" as I will be projecting out for 20-30 years.
Any help would be very much appreciated. Thank you in advance.
VIP
Trusted Members
December 7, 2016
VIP
Trusted Members
December 7, 2016
Hello,
You can use XLOOKUP with logical criteria for this scenario, see attached file for an example.
=XLOOKUP(1,(lookup_value1=lookup_array1)*(lookup_value2>=lookup_array2),return_array,,0,-1)
The important part here in your example is to set match_mode to search from last to first.
Br,
Anders
1 Guest(s)