If Formula Between Values

dennyvle

New Member
Hello,

I'm trying to set up a formula to calculate social security expense every month. The problem is the social security has an annual max limit of \$7,254.

So I have the monthly salary and the social security rate of 6.20%.

Here is an example:

 Jan Feb Mar Apr May Salary \$ 40,000.00 \$ 40,000.00 \$ 40,000.00 \$ 40,000.00 \$ 40,000.00 SS Rate 6.20% 6.20% 6.20% 6.20% 6.20% SS \$ 2,480.00 \$ 2,480.00 \$ 2,480.00 \$ 2,480.00 \$ 2,480.00

<colgroup><col><col span="5"></colgroup><tbody>
</tbody>

In March, the social security already exceeds the \$7,254 limit. I need the total social security in Jan-Mar to equal exactly \$7,254.

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.
welcome to the board.

Assuming your table starts in A1, enter this in B4:

=IF(B2*B3>7254,7254,B2*B3)

Enter this in C4 and drag across:

=IF(SUM(\$B\$4:B4)+C2*C3>=7254,7254-SUM(\$B\$4:B4),C2*C3)

This can probably be simplified but in the meantime I will post what I have:

Excel 2010
BCDEFG
3JanFebMarAprMay
4Salary4000040000400004000040000
5SS Rate6.20%6.20%6.20%6.20%6.20%
6SS24802480229400
Sheet2
Cell Formulas
RangeFormula
C6=IF(SUM(\$B\$6:B6)+(C4*C5)<=7254,C4*C5,C4*C5-(ABS(7254-(SUM(\$B\$6:B6)+(C4*C5)))))

Perfect. Thanks you!

Replies
2
Views
202
Replies
12
Views
998
Replies
3
Views
379
Replies
3
Views
2K
Replies
3
Views
690

1,196,154
Messages
6,013,756
Members
441,781
Latest member
Gian Carlos

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back