Macro for calculating taxes

kbisho7848

New Member
Joined
Apr 16, 2019
Messages
1
I'm having a lot of trouble starting this sub in vba. Here is what I have already, but I'm not sure if I'm taking to right angle.
Sub tax()Dim income As Double
Dim tax As Double
income = InputBox("enter your income")
If income >= 200000 Then
tax = ".35/income"
else if income
End Sub



Assume you want to create a calculator that can help people to calculate their taxes. You will create an input box to ask people about their income and the program will display their taxes in a message box ank ask the users if they have another income to calculate its taxes. Call the module Tax. Assign the macro to a button. The macro should keep looping until the user click no for having no more income to calculate the taxes for. The program should calculate the tax for one income per time

  1. 35% on income greater than or equal to $200000
  2. 29% on income greater than or equal to $70000 and less that $200000
  3. 27% on income greater than or equal to $30000 and less that $70000
  4. 17% on income greater than or equal to $10000 and less that $30000
  5. 12% on income greater than or equal to $3000 and less that $10000
  6. Otherwise it will be 0
 

Excel Facts

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

Forum statistics

Threads
1,223,886
Messages
6,175,196
Members
452,616
Latest member
intern444

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.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

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

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

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
Back
Top