Thread
:
simple macro
View Single Post
#
2
Posted to microsoft.public.excel.programming
Don Guillett[_4_]
external usenet poster
Posts: 2,337
simple macro
try this
Sub cut5()
On Error Resume Next
ActiveCell = Left(ActiveCell, (Len(ActiveCell) - 5))
End Sub
--
Don Guillett
SalesAid Software
"Joe" wrote in message
...
Hi Folks
I have the following macro that, for the life of me, I can't seem to
change so that it cuts the last 5 characters of a cell instead of the first
5 characters. Any help much appreicated.
Sub MoveAround()
Dim CellVal As String
CellVal = ActiveCell.Text
Range(ActiveCell.Address) = Right(CellVal, Len(CellVal) - 6)
ActiveCell.Offset(0, 1).Select
Range(ActiveCell.Address) = Left(CellVal, 6)
ActiveCell.Offset(1, -1).Select
End Sub
Reply With Quote
Don Guillett[_4_]
View Public Profile
Find all posts by Don Guillett[_4_]