Results 1 to 4 of 4
  1. #1
    4 Star Lounger
    Join Date
    Aug 2001
    Location
    Anaheim, California, USA
    Posts
    560
    Thanks
    17
    Thanked 2 Times in 2 Posts

    Removing Spaces (2003/SP2)

    I have a report that downloads in txt format that I use in Word. It is a columnar report but each column is seperated by spaces. What I want to do is replace the spaces with tabs, using Find and Replace, but since it is a different number of spaces between each column I don't know what to put in for my search criteria. There are no spaces in any of the column entries. How do I search for varying groups of spaces? Thanks for the help.

  2. #2
    Star Lounger
    Join Date
    Jul 2006
    Location
    Colorado, USA
    Posts
    55
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Removing Spaces (2003/SP2)

    You could look for white space ^w in the Find and tab ^t in the Replace. Whitespace will treat variable number of spaces, tabs, etc as one unit.

  3. #3
    Bronze Lounger IanWilson's Avatar
    Join Date
    Dec 2000
    Location
    Bristol, United Kingdom
    Posts
    1,523
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Removing Spaces (2003/SP2)

    You could first replace all the multiple spaces with single spaces. Just put 2 spaces in the find box and 1 in the replace box, and keep clicking replace all until there are no double spaces. Then replace the single spaces with tabs (by putting a space in the find box and ^t in the replace box).

    Ian

    Edited to add pi-eater's post arrived between my starting and sending mine!

  4. #4
    4 Star Lounger
    Join Date
    Aug 2001
    Location
    Anaheim, California, USA
    Posts
    560
    Thanks
    17
    Thanked 2 Times in 2 Posts

    Re: Removing Spaces (2003/SP2)

    Perfect! I didn't even realize that was an option, (although it is listed under Special in the Replace Dialog Box). Thanks for the help.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •