joelevinger
Programmer
Hello,
Using VBScript, I am trying to display a number in scientific notation if it is larger than 1 billion or smaller than 0.001. Otherwise, I want to display it in regular format, using the formatNumber function. In pseudocode, it would look like this:
If number is > 1 billion or number is < 0.001 Then
display the number using scientific notation
Else
display the number using the formatNumber function
End If
My problem is that I can't find a function to display the number using scientific notation. It turns out that if the number is >= 1 quadrillion (1,000,000,000,000,000) or smaller than 0.000000000000001, it displays in scientific notation, but otherwise it displays in regular notation. Do you have any ideas how to force it to display in scientific notation?
Any ideas would be greatly appreciated!
Joe Levinger
Using VBScript, I am trying to display a number in scientific notation if it is larger than 1 billion or smaller than 0.001. Otherwise, I want to display it in regular format, using the formatNumber function. In pseudocode, it would look like this:
If number is > 1 billion or number is < 0.001 Then
display the number using scientific notation
Else
display the number using the formatNumber function
End If
My problem is that I can't find a function to display the number using scientific notation. It turns out that if the number is >= 1 quadrillion (1,000,000,000,000,000) or smaller than 0.000000000000001, it displays in scientific notation, but otherwise it displays in regular notation. Do you have any ideas how to force it to display in scientific notation?
Any ideas would be greatly appreciated!
Joe Levinger