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

That is because you cell doesn't contain a "/", at least the value property
doesn't

try putting in a text

if instr(1,c.value,"/") < 0 then
c.Value = Left(c.Value, InStr(1, c.Value, "/") - 1)
End if

--
Regards,
Tom Ogilvy

"Steven" wrote in message
...
Thanks Frank
I had tried that and I am getting "Invalid Procedure Call" on

c.Value = Left(c.Value, InStr(1, c.Value, "/") - 1)

Thanks again