Dim'ing a variable?

I did not Dim a variable that I named, and they are coming out odd.

How would I properly dim these some they come out as values I can use?  The ones with E-02 are not in a .0123 format but the others are?  Please review attached screenshot.  Thanks.
Who is Participating?
NorieVBA ExpertCommented:
All of them should be declared as Double data type, but that isn't going to change their values/format.

What you are probably seeing for IEDealerDisplayQuickFindTimeAvg and ChromeDealerDisplayQuickFindTimeAvg are very small values due to the rounding errors you get when doing floating point arithmetic.

If those values are causing you problems you should look into rounding then.
Martin LissOlder than dirtCommented:
You can also Dim them as Currency with no symbol (dollar sign, Euro, etc) and your choice of decimal places.
Gustav BrockCIOCommented:
If you only need a maximum of four decimals, Currency is your choice, indeed if you will calculate on these values. That will free you from the endless count of decimals you now have for some values.

When you display the values, just apply a format like "Standard" or "Fixed" with the count of decimals you wish.

RWayneHAuthor Commented:
Thanks, appreciate the help.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.