Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Function to deduct amount and percentage

Hey Guys,


I’m creating a payroll sheet and need some help programing a function. I need to figure out ‘Net Wages Earned’ after-tax deductions, I’ve programed functions for most of the info, but have not been able to figure out how to automatically deduct the appropriate amount based on the IRS’ complex tables. Ive attached one of the tables for an example. Any ideas?


Any help would be greatly appreciated.


User uploaded file

(The above table to the IRS, I found it on their website. No copyright infringement is intended)

iOS 7.1

Posted on Apr 8, 2014 11:12 AM

Reply
Question marked as Best reply

Posted on Apr 8, 2014 11:52 AM

Byron,


Here's a solution that expands the calculations for clarity. It could be compacted to a one column calculation if desired.


User uploaded file

The expressions in the calculations table are as follows:


Column A is the earnings input column.


Column B: =VLOOKUP(A, Lookup Tax Table::A:C, 1, 1)


Column C: =VLOOKUP(A, Lookup Tax Table::A:C, 2, 1)


Column D: =VLOOKUP(A, Lookup Tax Table::A:C, 3, 1)


Column E: =C+(A2−B2)×D


I hope this gets you on your way.


Jerry

22 replies
Question marked as Best reply

Apr 8, 2014 11:52 AM in response to The Other Byron

Byron,


Here's a solution that expands the calculations for clarity. It could be compacted to a one column calculation if desired.


User uploaded file

The expressions in the calculations table are as follows:


Column A is the earnings input column.


Column B: =VLOOKUP(A, Lookup Tax Table::A:C, 1, 1)


Column C: =VLOOKUP(A, Lookup Tax Table::A:C, 2, 1)


Column D: =VLOOKUP(A, Lookup Tax Table::A:C, 3, 1)


Column E: =C+(A2−B2)×D


I hope this gets you on your way.


Jerry

Apr 8, 2014 11:50 AM in response to The Other Byron

You can do something like this:

1) create a table that mirrors the one you posted

2) create a table that use the table in (1)


User uploaded file

the table on the right is tited "Withholding Lookup" and contains the same information in the table you posted


The table on left uses the information in the table "Withholding Lookup".


For the table on the left (titled "Table 5" in the image I posted):

column A is where you enter the amount and column B is the amount computed from information in the table on the right.


B2=VLOOKUP(A2,Withholding Lookup::A:C, 3)+VLOOKUP(A2,Withholding Lookup::A:C, 2)×(A2−VLOOKUP(A2,Withholding Lookup::A:C, 1))÷100


this is shorthand for select cell B2 and type (or copy and paste from here) the formula:

=VLOOKUP(A2,Withholding Lookup::A:C, 3)+VLOOKUP(A2,Withholding Lookup::A:C, 2)×(A2−VLOOKUP(A2,Withholding Lookup::A:C, 1))÷100


you can fill down if you need to by select cell B2 then hover the cursor over the bottom edge then drag down the yellow circle as needed

Apr 16, 2014 7:10 AM in response to The Other Byron

?


User uploaded file


1600 is greater than 1582 and less than 3025. so the base is:

195.4 plus 25% of the excess.


the excess is (1600-1582) which is 18


0.25*18 = 4.5


so 195.4 + 4.5 = 199.9


I had a typo in my formula which results in being off by a percent.


User uploaded file

B2=VLOOKUP(A2,Withholding Lookup::A:C, 3)+VLOOKUP(A2,Withholding Lookup::A:C, 2)×(A2−(VLOOKUP(A2,Withholding Lookup::A:C, 1)−1))÷100


I had to subtract one from the base amount.


copy this formula and paste into cell B1, then fill down as needed.

Function to deduct amount and percentage

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.