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

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.
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,220,965
Messages
6,157,119
Members
451,399
Latest member
alchavar

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