+ Reply to Thread
Results 1 to 5 of 5

removing spaces after words

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    08-19-2009
    Location
    uk
    MS-Off Ver
    Excel 2010
    Posts
    147

    removing spaces after words

    Hi,

    Spaces after entries keep messing up my VLOOKUPS. I get a lot of data from other people and when they have entered the information in some of the entries have a space after the word which mess up the results of my vlookups. Is there an easy way of going through and removing spaces after a word? Not all the words have spaces after them.

    Many thanks for your help
    Last edited by Chemistification; 10-21-2009 at 09:53 AM.

  2. #2
    Forum Contributor
    Join Date
    04-14-2009
    Location
    Wales
    MS-Off Ver
    Excel 2010
    Posts
    129

    Re: removing spaces after words

    Hello, if there is just one space, you could highlight the column or row, press Ctrl H and serch for a space and replace with nothing. Hope this helps.

  3. #3
    Forum Expert darkyam's Avatar
    Join Date
    03-05-2008
    Location
    Houston, TX
    MS-Off Ver
    2013
    Posts
    2,191

    Re: removing spaces after words

    If the entries are all only one word each, use =Substitute(A1," ","") and copy down, then copy all of these and paste over the original data as values and delete this column.

    If they have multiple words, use the formula =IF(RIGHT(A1)=" ",LEFT(A1,LEN(A1)-1. This assumes there is only one space at the end of these words.

    *Edit: Too slow, apparently. If only one space, omletto's suggestion is better. Silly me, I keep trying to do things with formulas.

  4. #4
    Forum Contributor
    Join Date
    08-19-2009
    Location
    uk
    MS-Off Ver
    Excel 2010
    Posts
    147

    Re: removing spaces after words

    Quote Originally Posted by darkyam View Post
    If the entries are all only one word each, use =Substitute(A1," ","") and copy down, then copy all of these and paste over the original data as values and delete this column.

    If they have multiple words, use the formula =IF(RIGHT(A1)=" ",LEFT(A1,LEN(A1)-1. This assumes there is only one space at the end of these words.

    *Edit: Too slow, apparently. If only one space, omletto's suggestion is better. Silly me, I keep trying to do things with formulas.
    Still tho like that second one for if i have two words. Both of these should easily help. Thanks both

  5. #5
    Forum Contributor
    Join Date
    08-19-2009
    Location
    uk
    MS-Off Ver
    Excel 2010
    Posts
    147

    Re: removing spaces after words

    Nice. I thought there would be a simple answer to this. Just got caught up in thinking about formulas that i overloked the obvious. Thanks for that.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1