Hello Maps,
Since you are using Office 365, we can use the complete LET formula rather than changing individual parts of the previous formula.
Based on the cell references from our earlier discussion, use this formula for your YTD tax:
=IF(C23<MAX(C31,C24),0,
LET(
DaysWorked,C23-MAX(C31,C24)+1,
DaysYear,D31-C31+1,
AnnualIncome,(D17-D19)/DaysWorked*DaysYear,
Rebate,IF(DATEDIF(C21,C23,"Y")<60,8200,
IF(DATEDIF(C21,C23,"Y")<75,10900,12100)),
Band,MATCH(AnnualIncome,$A$5:$A$8,1),
AnnualTax,INDEX($C$5:$C$8,Band)
+(AnnualIncome-INDEX($A$5:$A$8,Band))
*INDEX($D$5:$D$8,Band),
ROUND(MAX(0,AnnualTax-Rebate)/DaysYear*DaysWorked,2)
))
This formula uses your YTD earnings in D17, YTD deductible in D19 and the employee's engagement date in C24. It also adjusts for the applicable tax bracket, rebate and number of days employed.
However, I noticed something important in your example. Based on the 20% tax rate and the rebate of 673.97:
Calculation Tax
4,500 × 20% − 673.97 226.03
(4,500 − 215) × 20% − 673.97 183.03
This suggests that your current-month calculation may not be subtracting the 215 deductible, whereas your YTD calculation does.
If 4,500 is the gross salary and the 215 deduction applies, use the same deduction in both calculations. If 4,500 is already the taxable salary after the deduction, do not subtract 215 again.
For September, since the employee started on 1 September, both calculations should cover the same 30 days and produce the same result when using identical taxable earnings and tax rules.
Please also check whether the cell positions in your new spreadsheet are unchanged, as the formula above uses the references from your previous worksheet.