Hi,
Starting with the macro recorder is a good approach, however the most
(or a more) effective way of doing this can not be replicated using the
recorder because a lot can be done without selecting.
If the layout (ie spacing) of the cell string will always be the same,
try:
Sub InsertYears()
Dim OriginalString As String
OriginalString = Range("C37").Value
Range("C14").Value = Mid(OriginalString, 13, 4)
Range("C15").Value = Right(OriginalString, 4)
End Sub
which can usually be shortened (provided excel considers ".value" as
the default) to:
Sub InsertYears()
Dim OriginalString As String
OriginalString = Range("C37")
Range("C14") = Mid(OriginalString, 13, 4)
Range("C15") = Right(OriginalString, 4)
End Sub
hth
Rob Brockett
NZ
Always learning & the best way to learn is to experience...
--
broro183
------------------------------------------------------------------------
broro183's Profile:
http://www.excelforum.com/member.php...o&userid=30068
View this thread:
http://www.excelforum.com/showthread...hreadid=534508