Sub ObtenirLeFormatNumeriqueStandard()
Dim t(4)
t(1) = "1,234E+001"
t(2) = "1,234E+1"
t(3) = "1,234E+0"
t(4) = "1,234"
For i = 1 To 4
Set c = Cells(i, 1)
c.NumberFormat = "@"
c.Value = t(i)
Next
For i = 1 To 4
Set c = Cells(i, 1)
'Forcer le format numerique standard
c.Offset(, 2).NumberFormat = "0.00"
c.Offset(, 2).Value = Cells(i, 1).Value
Next
End Sub
Sub ForcerLeFormatScientifique()
Dim t(4)
t(1) = "1,234E+001"
t(2) = "1,234E+1"
t(3) = "1,234E+0"
t(4) = "1,234"
For i = 1 To 4
Set c = Cells(i, 1)
c.NumberFormat = "@"
c.Value = t(i)
Next
For i = 1 To 4
Set c = Cells(i, 1)
'Forcer le format scientifique
If InStr(UCase(Cells(i, 1)), "E") Then
c.Offset(, 1).NumberFormat = "General"
Else
c.Offset(, 1).NumberFormat = "0.00E+00"
End If
c.Offset(, 1).Value = Cells(i, 1).Value
Next
End Sub