chaz_mac
Board Regular
- Joined
- Mar 9, 2007
- Messages
- 76
At times I get Excel files from another group, where numeric values are stored in the form "92.5" instad of the number 93.5 - Excel sees these as text strings intstead of numbers.
blank rows and columns are used in these to separate groups of information, with thousand of values on each worksheet. And, many worksheets.
I need numbers to plot and analyze, so i need to convert these. So, i wrote a macro:
Option Explicit
Sub make_number()
Dim non_blank As Range, allcells As Range, cell As Range, iLoop as integer
For iLoop = 1 To Worksheets.Count
Worksheets(iLoop).Activate
Set allcells = Range("A1:Z2000")
Set non_blank = allcells.SpecialCells(xlCellTypeConstants)
For Each cell In non_blank
If IsNumeric(cell.Text) Then cell.Value = Evaluate(cell.Text)
Next cell
Next ILoop
End Sub
Unfortunately, This is very slow, I turned on screen updating and it looks like I am working on every cell instead of just non-blank.
Any suggestions?
Thanks -
Chaz
blank rows and columns are used in these to separate groups of information, with thousand of values on each worksheet. And, many worksheets.
I need numbers to plot and analyze, so i need to convert these. So, i wrote a macro:
Option Explicit
Sub make_number()
Dim non_blank As Range, allcells As Range, cell As Range, iLoop as integer
For iLoop = 1 To Worksheets.Count
Worksheets(iLoop).Activate
Set allcells = Range("A1:Z2000")
Set non_blank = allcells.SpecialCells(xlCellTypeConstants)
For Each cell In non_blank
If IsNumeric(cell.Text) Then cell.Value = Evaluate(cell.Text)
Next cell
Next ILoop
End Sub
Unfortunately, This is very slow, I turned on screen updating and it looks like I am working on every cell instead of just non-blank.
Any suggestions?
Thanks -
Chaz