Thread: Truncate
View Single Post
  #10   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Truncate

Sub Truncate

Dim rng As Range
Dim c As Range
Dim ln as Long
Set rng = Selection
For Each c In rng
if instr(1,c.value,"/") < 0 then
c.Value = Mid(c.Value, InStr(1, c.Value, "/") + 1 ,255)
' '''or
' ln = len(c.value) - instr(1,c.Value,"/")
' c.Value = Right(c.Value,ln)
End if
Next
End Sub

--
Regards,
Tom Ogilvy

"Steven" wrote in message
...
Thanks Tom
That worked as posted---now I realize I need to save to right of "/" so

what would the modification be.....
Thanks for all of your help!
Steven