Create Formula for Excel to Calculate Income Tax as per New Regime


Problem

It created formula in MS excel for calculating income Tax as per New Regime, no need to put slab rates manually.

Prompt Input

create a coding for vba to make a formula Name of formula- CALCITNEWREG it should calculate the amount based on the following slab rate: From To Slab Rate 0 400000 0 400000 800000 5% of cell 800000 1200000 10% of cell + 20,000 1200000 1600000 15% of cell + 60,000 1600000 2000000 20% of cell + 1,20,000 2000000 2400000 25% of cell + 2,00,000 2400000 30% of cell + 3,00,000

Prompt Output

Function CALCITNEWREG(ByVal income As Double) As Double Select Case income Case Is <= 400000 CALCITNEWREG = 0 Case Is <= 800000 CALCITNEWREG = (income - 400000) * 0.05 Case Is <= 1200000 CALCITNEWREG = ((income - 800000) * 0.1) + 20000 Case Is <= 1600000 CALCITNEWREG = ((income - 1200000) * 0.15) + 60000 Case Is <= 2000000 CALCITNEWREG = ((income - 1600000) * 0.2) + 120000 Case Is <= 2400000 CALCITNEWREG = ((income - 2000000) * 0.25) + 200000 Case Else CALCITNEWREG = ((income - 2400000) * 0.3) + 300000 End Select End Function

LLM Name: ChatGPT