Dear All Master,
I want help modifying my vba code below because it is still slow and the row record is above 200000
and also a problem with the results if the table data in the "eg" sheet is filtered then the result is wrong
so I want a very fast vba array code . So there are 2 process options, first convert text to number which is
only filtered and secondly convert vba all in the "g" column in a filtered state and without filter as well.
Thanks
kana
I want help modifying my vba code below because it is still slow and the row record is above 200000
and also a problem with the results if the table data in the "eg" sheet is filtered then the result is wrong
so I want a very fast vba array code . So there are 2 process options, first convert text to number which is
only filtered and secondly convert vba all in the "g" column in a filtered state and without filter as well.
VBA Code:
Option Explicit
Sub texttoNum()
Dim ar As Variant
Dim var As Variant
Dim i As Long
Dim lr As Long
lr = Sheets("cth").Range("G" & Rows.Count).End(xlUp).Row
ar = Range("G2:G" & lr)
ReDim var(1 To UBound(ar), 1 To 1)
For i = 1 To UBound(ar) 'Start of VBA loop
var(i, 1) = ar(i, 1) * 1
Next i
Sheets("cth").Range("g2:g" & lr) = var
End Sub
kana