Transform the E notation (5.41603241874481E-02 )

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi
Is there a function, which transform the E notation to a regular number?
I have a function with a double argument. This function demands regular
digits because the double is converted to a text, which is processed. The E
makes the function crash. I have no possibility to change the function so my
only way is to convert E notation numbers to regular numbers. How can I do
this?
Regards
/Niklas
 
A number is a number. E notations is a way it might be displayed. If you
want to convert it to a string for processing, you can use the format
command

Dim dblNum as Double

dblNum = 5.41603241874481E-02
sStr = Format(dblNum,"0.00000000000000000")

msgbox sStr
 
Thanks. It works fine.
Regards
/Niklas

Tom Ogilvy said:
A number is a number. E notations is a way it might be displayed. If you
want to convert it to a string for processing, you can use the format
command

Dim dblNum as Double

dblNum = 5.41603241874481E-02
sStr = Format(dblNum,"0.00000000000000000")

msgbox sStr
 

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