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

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.
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,227
Messages
6,170,848
Members
452,361
Latest member
d3ad3y3

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