Forum

Notifications
Clear all

Excel Formula to Calculate Taxes using Tax Tables

5 Posts
3 Users
0 Reactions
239 Views
(@kvnsully)
Posts: 9
Active Member
Topic starter
 

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.

 
Posted : 09/02/2023 4:50 pm
Anders Sehlstedt
(@sehlsan)
Posts: 968
Prominent Member
 

Hello Kevin,

Unfortunatly, the file upload did not go through. Seems you might have forgot to click the start upload button after you added the file.

Br,
Abders

 
Posted : 09/02/2023 7:07 pm
(@kvnsully)
Posts: 9
Active Member
Topic starter
 

Apologize - I'm still learning how to upload files and use the forum.

Attached is the file called Calculated Tax.xlsx (I hope) that I was referring to in my original post.

 
Posted : 09/02/2023 7:39 pm
Anders Sehlstedt
(@sehlsan)
Posts: 968
Prominent Member
 

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

 
Posted : 10/02/2023 2:18 am
(@jstewart)
Posts: 216
Estimable Member
 

You could also do it using Power Query. See attached.

 
Posted : 10/02/2023 1:19 pm
Share: