L
Tôi có đoạn mã VBA và đã thực hiện như hướng dẫn để đưa đoạn mã đó vào module. các bước tiếp theo để thực hiện trong excel làm như thế nào thì tôi không biết.các bạn chỉ giáo cho tôi với.Cảm ơn các bạn nhé.
Đây là đoạn mã tôi đã đưa vào để tính thuế TNCN
Function pitlc(gross_local)
'Personal Income Tax for Local Vietnamese Citizen
If (gross_local > 0) And (gross_local <= 5000000) Then
pitlc = 0
ElseIf (gross_local > 5000000) And (gross_local <= 15000000) Then
pitlc = (gross_local - 5000000) * 0.1
ElseIf (gross_local > 15000000) And (gross_local <= 25000000) Then
pitlc = 1000000 + ((gross_local - 15000000) * 0.2)
ElseIf (gross_local > 25000000) And (gross_local <= 40000000) Then
pitlc = 3000000 + ((gross_local - 25000000) * 0.3)
ElseIf (gross_local > 40000000) Then
pitlc = 7500000 + ((gross_local - 40000000) * 0.4)
End If
End Function
Function pitfr(gross_foreign)
'Personal Income Tax for Resident Foreigner in Vietnamese
If (gross_foreign > 0) And (gross_foreign <= 8000000) Then
pitfr = 0
ElseIf (gross_foreign > 8000000) And (gross_foreign <= 20000000) Then
pitfr = (gross_foreign - 8000000) * 0.1
ElseIf (gross_foreign > 20000000) And (gross_foreign <= 50000000) Then
pitfr = 1200000 + ((gross_foreign - 20000000) * 0.2)
ElseIf (gross_foreign > 50000000) And (gross_foreign <= 80000000) Then
pitfr = 7200000 + ((gross_foreign - 50000000) * 0.3)
ElseIf (gross_foreign > 80000000) Then
pitfr = 16200000 + ((gross_foreign - 80000000) * 0.4)
End If
End Function
Function net2grosslc(net_local)
'Local Net Salary to be gross-up to Gross Salary
If (net_local > 0) And (net_local <= 5000000) Then
net2grosslc = net_local
ElseIf (net_local > 5000000) And (net_local <= 14000000) Then
net2grosslc = Round((net_local - 500000) / 0.9, 0)
ElseIf (net_local > 14000000) And (net_local <= 22000000) Then
net2grosslc = Round((net_local - 2000000) / 0.8, 0)
ElseIf (net_local > 22000000) And (net_local <= 32500000) Then
net2grosslc = Round((net_local - 4500000) / 0.7, 0)
ElseIf (net_local > 32500000) Then
net2grosslc = Round((net_local - 8500000) / 0.6, 0)
End If
End Function
Function net2grossfr(net_foreign)
'Foreigner Net Salary to be gross-up to Gross Salary
If (net_foreign > 0) And (net_foreign <= 8000000) Then
net2grossfr = net_foreign
ElseIf (net_foreign > 8000000) And (net_foreign <= 18800000) Then
net2grossfr = Round((net_foreign - 800000) / 0.9, 0)
ElseIf (net_foreign > 18800000) And (net_foreign <= 42800000) Then
net2grossfr = Round((net_foreign - 2800000) / 0.8, 0)
ElseIf (net_foreign > 42800000) And (net_foreign <= 63800000) Then
net2grossfr = Round((net_foreign - 7800000) / 0.7, 0)
ElseIf (net_foreign > 63800000) Then
net2grossfr = Round((net_foreign - 15800000) / 0.6, 0)
End If
End Function
Đây là đoạn mã tôi đã đưa vào để tính thuế TNCN
Function pitlc(gross_local)
'Personal Income Tax for Local Vietnamese Citizen
If (gross_local > 0) And (gross_local <= 5000000) Then
pitlc = 0
ElseIf (gross_local > 5000000) And (gross_local <= 15000000) Then
pitlc = (gross_local - 5000000) * 0.1
ElseIf (gross_local > 15000000) And (gross_local <= 25000000) Then
pitlc = 1000000 + ((gross_local - 15000000) * 0.2)
ElseIf (gross_local > 25000000) And (gross_local <= 40000000) Then
pitlc = 3000000 + ((gross_local - 25000000) * 0.3)
ElseIf (gross_local > 40000000) Then
pitlc = 7500000 + ((gross_local - 40000000) * 0.4)
End If
End Function
Function pitfr(gross_foreign)
'Personal Income Tax for Resident Foreigner in Vietnamese
If (gross_foreign > 0) And (gross_foreign <= 8000000) Then
pitfr = 0
ElseIf (gross_foreign > 8000000) And (gross_foreign <= 20000000) Then
pitfr = (gross_foreign - 8000000) * 0.1
ElseIf (gross_foreign > 20000000) And (gross_foreign <= 50000000) Then
pitfr = 1200000 + ((gross_foreign - 20000000) * 0.2)
ElseIf (gross_foreign > 50000000) And (gross_foreign <= 80000000) Then
pitfr = 7200000 + ((gross_foreign - 50000000) * 0.3)
ElseIf (gross_foreign > 80000000) Then
pitfr = 16200000 + ((gross_foreign - 80000000) * 0.4)
End If
End Function
Function net2grosslc(net_local)
'Local Net Salary to be gross-up to Gross Salary
If (net_local > 0) And (net_local <= 5000000) Then
net2grosslc = net_local
ElseIf (net_local > 5000000) And (net_local <= 14000000) Then
net2grosslc = Round((net_local - 500000) / 0.9, 0)
ElseIf (net_local > 14000000) And (net_local <= 22000000) Then
net2grosslc = Round((net_local - 2000000) / 0.8, 0)
ElseIf (net_local > 22000000) And (net_local <= 32500000) Then
net2grosslc = Round((net_local - 4500000) / 0.7, 0)
ElseIf (net_local > 32500000) Then
net2grosslc = Round((net_local - 8500000) / 0.6, 0)
End If
End Function
Function net2grossfr(net_foreign)
'Foreigner Net Salary to be gross-up to Gross Salary
If (net_foreign > 0) And (net_foreign <= 8000000) Then
net2grossfr = net_foreign
ElseIf (net_foreign > 8000000) And (net_foreign <= 18800000) Then
net2grossfr = Round((net_foreign - 800000) / 0.9, 0)
ElseIf (net_foreign > 18800000) And (net_foreign <= 42800000) Then
net2grossfr = Round((net_foreign - 2800000) / 0.8, 0)
ElseIf (net_foreign > 42800000) And (net_foreign <= 63800000) Then
net2grossfr = Round((net_foreign - 7800000) / 0.7, 0)
ElseIf (net_foreign > 63800000) Then
net2grossfr = Round((net_foreign - 15800000) / 0.6, 0)
End If
End Function