Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How can I format values to always display as E-10

Status
Not open for further replies.

wmbb

Technical User
Jul 17, 2005
320
NL
How can I format values to always display as xxxx E-10
So not just a scientific notation but specific E-10
 
Something like the following (although this is far from perfect, it illustrates a method)

Code:
[COLOR=blue]Public Function specialformat(Expression As Variant) As String
     Dim fmt As String
     fmt = String(10 + Len(CStr(Int(Expression))), "0") & "E+"
     specialformat = format(Expression, fmt)
End Function[/color]
 
Thank you for your support but this was not what I was looking for, unfortunately.
Using this notation, the result is not a number anymore I can make a calculation with :-(
I've solved it another way, but thank you anyway
 
Does the user defined format I suggested in reply to your thread posted at Ms Office forum work?

combo
 
Hi Combo,
Sorry for the late reply.
Your option in the other forum did not work for me either.
I've multiplied the numbers with E+10 and mentioned in the header row that the values are shown as E-10 like shown below.

Intensity(A)
(*E-10)


0.0401
0.092
331.5145
0.0398
0.0135
284.0515



 
>I've solved it another way

Would you like to share with the forum? I ask as other people may find this querstion in the future, having a similar one of their own, and it would be useful for them to see how you solved it since neither m y nor combo's answers seem suitable.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top