I have a macro that trims the first 7 characters of a string.
It works but only on one active cell at a time.
How do I make it work on a selected range of cells?
This is the code I have:
It works but only on one active cell at a time.
How do I make it work on a selected range of cells?
This is the code I have:
Code:
Sub Trimmail()
Dim MyCell As Range
On Error Resume Next
For Each MyCell In Selection.Cells
MyCell.Value = Right(Selection.Cells, Len(Selection.Cells) - 7)
Next
On Error GoTo 0
End Sub