+ Reply to Thread
Results 1 to 4 of 4

replace space in string with non-space

  1. #1
    Valued Forum Contributor
    Join Date
    11-20-2003
    MS-Off Ver
    2010, 2016
    Posts
    1,173

    replace space in string with non-space

    I have a list of numbers in in column K. Example as follows:
    12345678
    12 6567893
    65236688
    533 5944
    903 5234

    I want to extract the first 5 characters, not including spaces. The code below is taking the first 5 characters and removing the spaces but it is counting the space as a character. For example...533 5944 returns a value of 5335. It should return a value of 53359. I tried putting the replace function in a different part of formula but can't get it working. Any assistance is appreciated. Thanks.

    Please Login or Register  to view this content.
    Last edited by maacmaac; 01-08-2012 at 03:00 AM.

  2. #2
    Forum Expert Paul's Avatar
    Join Date
    02-05-2007
    Location
    Wisconsin
    MS-Off Ver
    2016/365
    Posts
    6,885

    Re: replace space in string with non-space

    Hi Maac, try:
    Please Login or Register  to view this content.

  3. #3
    Forum Expert
    Join Date
    12-15-2009
    Location
    Chicago, IL
    MS-Off Ver
    Microsoft Office 365
    Posts
    3,177

    Re: replace space in string with non-space

    try
    Please Login or Register  to view this content.

  4. #4
    Valued Forum Contributor
    Join Date
    11-20-2003
    MS-Off Ver
    2010, 2016
    Posts
    1,173

    Re: replace space in string with non-space

    Thanks for tip. Both methods work. I ended up going with
    Please Login or Register  to view this content.

+ 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