locked
convert scientific notation to double RRS feed

  • Question

  • Does anyone have a function that converts a string in scientific notation to a double data type?  Thanks.
    Friday, October 10, 2008 2:31 PM

Answers

  • Hi

    Can you try if CDbl works for you

    Sub String2Double()

    Dim sSciNotn As String
    Dim dSciNotn As Double

    sSciNotn = "2.3E2"

    dSciNotn = CDbl(sSciNotn)


    End Sub


    Cheers
    Shasur
    Saturday, October 11, 2008 2:33 AM

All replies

  • Hi

    Can you try if CDbl works for you

    Sub String2Double()

    Dim sSciNotn As String
    Dim dSciNotn As Double

    sSciNotn = "2.3E2"

    dSciNotn = CDbl(sSciNotn)


    End Sub


    Cheers
    Shasur
    Saturday, October 11, 2008 2:33 AM
  • HI Shasur,

     

    That works just fine.  Would never have thought it would be so simple.

     

    Thanks very much.

     

    Regards

     

    Don

     

    Saturday, October 11, 2008 12:26 PM