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

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.
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,224,820
Messages
6,181,160
Members
453,021
Latest member
Justyna P

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