View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
[email protected] donna.gough@hydro.com is offline
external usenet poster
 
Posts: 81
Default Removing semicolons

Can you use something along the lines of:-

i = 1
Do
Target = Range("D" & i)
TargetLength = Len(Target)
CharLeft = Left(Target, 1)
CharRight = Right(Target, 1)

If CharLeft = ";" Then Target = Right(Target, Len(Target) - 1)
If CharRight = ";" Then Target = Left(Target, Len(Target) - 1)

Range("D" & i) = Target
i = i + 1
Loop