View Single Post
  #3   Report Post  
Otto Moehrbach
 
Posts: n/a
Default

You can use the worksheet function Trim to reduce the 2 spaces to one space.
Look in Help under Trim.
To add a space as in your last example would depend on the pattern that your
data has. For instance, can you say that you want to add a space after the
third character of each entry that has 5 characters and no spaces? HTH
Otto
"carl" wrote in message
...
I have 5 character data that comes in with 0, 1, and 2 spaces.
I need to convert this data like so:

X__QH I need X_QH (2 Spaces replaced with 1 Space)
GS_EB I need GS_EB (1 Space No Change)
GOUQT I need GOU_QT (No Space, after 3rd Character insert 1 Space)

Is there a way to accomplish this ?

Thank you in advance.