+ Reply to Thread
Results 1 to 7 of 7

Convert to Scientific notation

  1. #1
    Registered User
    Join Date
    09-07-2010
    Location
    Allendale, MI
    MS-Off Ver
    Excel 2003
    Posts
    8

    Convert to Scientific notation

    I have a variable (A) defined and would like to change it's value to Scientific notation.

    I can't seem to get this to work.

    A = ActiveCell.Value

    Now I want to convert this to scientific notation and store it back into variable A

    Help!

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Convert to Scientific notation

    Variables don't have formats; cells do. Just change the number format of that cell to Scientific.
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Forum Expert snb's Avatar
    Join Date
    05-09-2010
    Location
    VBA
    MS-Off Ver
    Redhat
    Posts
    5,649

    Re: Convert to Scientific notation

    Please Login or Register  to view this content.



  4. #4
    Registered User
    Join Date
    09-07-2010
    Location
    Allendale, MI
    MS-Off Ver
    Excel 2003
    Posts
    8

    Re: Convert to Scientific notation

    The problem I am having is I need to convert this number and then write it to a text file.
    So I read in the number in the active cell, store it to a variable, then do some math on it, and finaly convert it to Scientific form and write that to a text file.

    Any suggestions?

  5. #5
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Convert to Scientific notation

    Please Login or Register  to view this content.

  6. #6
    Registered User
    Join Date
    09-07-2010
    Location
    Allendale, MI
    MS-Off Ver
    Excel 2003
    Posts
    8

    Re: Convert to Scientific notation

    All I get is a blank output

  7. #7
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Convert to Scientific notation

    Replace dblNum with the name of your variable.

    Post the code if you still have problems.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1