VBA to remove VAT from a Gross Value

tigerdel

Board Regular
Joined
Oct 13, 2015
Messages
145
Office Version
  1. 365
Platform
  1. Windows
Hi Guys

I need to have a textbox that shows the nett value before VAT from a Gross value

I have a UserForm with the following textboxes:

TextBox1 where the user enters the Gross value
TextBox2 where the user enters the applicable VAT Rate [default is set to 20]
TextBox3 is to contain the Nett value

the code I am using is:

Code:
Private Sub TextBox1_Change()
TextBox3.Value = Application.Evaluate(TextBox1.Value / (100 + TextBox2.Value) * (100))
TextBox3.Value = Format(ActiveCell, "£#.00")
End Sub

Something is not right but for the life of me I can't see what

Any geniuses out there tonight??

Thanks

Derek
 

Excel Facts

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.
your equation is wrong to gertthe net value you have to multiply by:
100 divided by 100 plus the VAT rate
e.g
TextBox3.Value = Application.Evaluate(TextBox1.Value * (100)/(100 + TextBox2.Value) )

I not even sure you need the application.evaluate either
 
Last edited:
Upvote 0
RESOLVED: VBA to remove VAT from a Gross Value

Many thanks
 
Upvote 0

Forum statistics

Threads
1,223,893
Messages
6,175,240
Members
452,621
Latest member
Laura_PinksBTHFT

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