0

I am curious, if there is option in VBA to check if string is just text or its number in scientific format e.g.(0,212E+01).

I tried isNumeric, val and some other functions,but without success. Also I found solution which is testing middle character and if its number, but it seems a bit shabby to me.

So my question is, if there is some more reliable solution to determine this?

Edit:

So steveo40 is correct, my mistake was in decimal separator....

Community
  • 1
  • 1
Luboš Suk
  • 1,526
  • 14
  • 38

1 Answers1

0

Try this...

Dim x As Range
Set x = Range("A1") 'Ur cell for which your are loking to find the format

If (x.NumberFormat = "0.00E+00") Then
MsgBox "Sceientific"
End If
Siva
  • 1,129
  • 1
  • 8
  • 13