How to identify a cell [format|category|number|scientific] for sea

  • Thread starter Thread starter delisle_d
  • Start date Start date
D

delisle_d

I currently have a project in which I need to identify a cell if it is
formatted with scientific and to ignore the data value. Similar to:

If objExcel.Cells(intRow,Column).xxxxx = scientific Then
Else intRow = intRow + 1

Any help would be gretly appreciated

Office --> Excel 2k3 using *.vbs
 
If I record a macro while I format a cell as Scientific with two decimal places,
I'd get this numberformat:
0.00E+00

And this recorded code.
Selection.NumberFormat = "0.00E+00"

So I could use:

if objExcel.cells(introw,intColumn).numberformat = "0.00E+00" then
'do nothing
else
introw = introw + 1
end if

But I'm not sure if that matches what you need to check for, either. There are
lots of variations of Scientific formatting.

(I wouldn't use a variable named Column in my code, either.)
 
Bonsour® Dave Peterson avec ferveur ;o))) vous nous disiez :
If I record a macro while I format a cell as Scientific with two
decimal places, I'd get this numberformat:
0.00E+00

And this recorded code.
Selection.NumberFormat = "0.00E+00"

So I could use:

if objExcel.cells(introw,intColumn).numberformat = "0.00E+00" then
'do nothing
else
introw = introw + 1
end if

But I'm not sure if that matches what you need to check for, either.
There are lots of variations of Scientific formatting.

;o)))
if objExcel.cells(introw,intColumn).numberformat Like ("*E+*") then
 
Back
Top