Divide 2 number and get a desimal in VBA

  • Thread starter Thread starter MrDeej
  • Start date Start date
M

MrDeej

HEllo!

I have a VB code which calulates a number for me

ex:
1 / 30 = 3,333334E-02

it is going to store the result, which should be 0,33, in a table.

How do i make VBA calculate correct and how do i format the field in the
table to match this?
 
use the Round function (or one of the variants, depending on what you want).
Check out Help for definitions and examples.
 
3.333334E-02 is correct. It is scientific notation of the number.
3.333334E-02 equals 0.03333333333

Try using your calculator to divide 1 by 30 and it will not indicate 0.33
but 0.033333333333333 or how ever many places it will display.
 
Back
Top