You might want to check that the cell actually contains a "/" or yo
might get unpleasant results/error.
Sub Truncate
Dim rng As Range
Dim c As Range
Set rng = Selection
For Each c In rng
if instr(1,c.value,"/") < 0 then
c.Value = Left(c.Value, InStr(1, c.Value, "/") - 1)
End if
Next
End Sub
if the cells contain dates, you might want to change Value to Text
--
Regards,
Tom Ogilv
--
Message posted from
http://www.ExcelForum.com