VBA code using if-elseif-statement

Shantella

New Member
Joined
Jun 4, 2023
Messages
2
Office Version
  1. 2007
Platform
  1. Windows
Hi.
I'm struggling to get my VBA code to work. What it need to do is if the Annual salary inserted in the input box is equal or less than the values in cells B3 and C3 and the age inserted in the input box is less than the value of cell b13, a calculation must be done where the annual salary less the value in d3 times the percentage in e3 less the value in c12, which must be displayed in a message box reading tax liablity and the amount calculated.
Attached is my workbook and VBA.

I would really appreciate your help. I've been struggling with this for the whole day...

Kind regards.
 

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.
When I want to attach my picture it states that the file is to big... I don't know how to reduce it.
 
Upvote 0
Pictures aren't helpful to anyone trying to help you. Use XL2BB to illustrate a sample of your sheet and expected results.
 
Upvote 0

Forum statistics

Threads
1,215,825
Messages
6,127,112
Members
449,359
Latest member
michael2

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