-
ACK! That would foul in case you had an empty cell...
[vba]
Sub removeText()
Dim rCell As Range
Dim LoopAgain As Boolean
Selection.Replace "/", " "
For Each rCell In Selection
Do
LoopAgain = False
If Len(rCell.Value) = 0 Then Exit Do
If Not Right(rCell.Value, 1) Like "#" Then
LoopAgain = True
rCell.Value = Left(rCell.Value, Len(rCell.Value) - 1)
Else
LoopAgain = False
End If
Loop While LoopAgain = True
Next
End Sub
[/vba]
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules