K
Kevin Lisboa
Don't know if anyone out there uses vb scripting with Excel, but I'm new to
it, and need some guidance.
I've managed to find a script that will strip all the non alpha-numeric
values from a cell and spit out just the alphanumeric values.
My dillemma is that the script only works for one cell, and I need to apply
it to about 25,000 cells. Anyone know how to retool this code so it works
properly?
Sub test()
Dim a$, b$, c$, i As Integer
a$ = Range("F2").Value
For i = 1 To Len(a$)
b$ = Mid(a$, i, 1)
If b$ Like "[A-Z,a-z,0-9]" Then
c$ = c$ & b$
End If
Next i
Range("G2").Value = c$
End Sub
Basically, once it processes cell F2 and puts the results in G2, I want it
to move to F3 and place the data in G3, etc and so on...
Any ideas?
--McBean
it, and need some guidance.
I've managed to find a script that will strip all the non alpha-numeric
values from a cell and spit out just the alphanumeric values.
My dillemma is that the script only works for one cell, and I need to apply
it to about 25,000 cells. Anyone know how to retool this code so it works
properly?
Sub test()
Dim a$, b$, c$, i As Integer
a$ = Range("F2").Value
For i = 1 To Len(a$)
b$ = Mid(a$, i, 1)
If b$ Like "[A-Z,a-z,0-9]" Then
c$ = c$ & b$
End If
Next i
Range("G2").Value = c$
End Sub
Basically, once it processes cell F2 and puts the results in G2, I want it
to move to F3 and place the data in G3, etc and so on...
Any ideas?
--McBean