View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
[email protected] paul.robinson@it-tallaght.ie is offline
external usenet poster
 
Posts: 789
Default Truncating a string in Excel

Hi
If you always have a "-" character before the text bit and your text is
in A2 then try

=Trim(RIGHT(A2,LEN(A2)-FIND("-",A2)))

This finds the postion of the "-", subtracts it from the length of the
text (so that is the length of the word you want), then extracts that
much text from the right hand side of the whole string. The trim deals
with any blank space lying about.
regards
Paul