Chad,
Glad to be of assisstance!
Keep on Exceling!
Note that a faster way would be to have Excel write the formula into a
dummy column, copy the results and paste.special xlvalues, than clear
the dummy column.
The only trick is to determine the number of rows.
But it would look something like:
Range("Z1:Z500").FormulaR1C1="=Left(Trim(RC2, 2) & "-" & _
Right(Trim(RC2), Len(Trim(RC2)) - 2)
--
sb
wrote in message
...
Steve,
Thanks this works great and saved me a huge headache.
Thanks
Chad
-----Original Message-----
Chad,
This seemed to work in Excel97 [watch word wrap]
Dim i As Long
i = 1
Do Until Cells(i, 2) = ""
Cells(i, 2) = Left(Trim(Cells(i, 2)), 2) & "-" & _
Right(Trim(Cells(i, 2)), Len(Trim(Cells(i, 2))) -
2)
i = i + 1
Loop
--
sb
"Chad Holstead" wrote in message
...
I am not very good at VB and need some help with a
Macro. I have spread sheet that is exported from
another
program. We need to reformat the data in Column B.
The
data comes into excell like this " 131212A" It
needs
to look like this "13-1212A". I have tried the
standard
recored macro, however it just replaces the data with
the
hard coded value. I need this to be able to handle
diffrent values in column B.
Any ideas would really help, I think this easy, I'm
just
not a vb guy.
Thans
Chad
.