Sub HypenateB()
Dim rng as Range, cell as Range
On Error Resume Next
set rng = Columns(2).SpecialCells(xlConstants,xlTextValues)
On Error goto 0
if not rng is nothing then
for each cell in rng
cell.Value = Left(cell,2) & "-" & right(cell,len(cell)-2)
Next
End if
End Sub
Test it on a copy of your data.
--
Regards,
Tom Ogilvy
"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