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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top