+ Reply to Thread
Results 1 to 6 of 6

Remove blank space in front of text to turn into a number. Trim, Substitute will not work.

  1. #1
    Registered User
    Join Date
    10-26-2015
    Location
    Minnesota
    MS-Off Ver
    2013
    Posts
    2

    Remove blank space in front of text to turn into a number. Trim, Substitute will not work.

    I cannot figure out how to remove one blank space in front of a text in column D to turn it into a number.

    This seems like it should be simple but i've tried looking up different tricks, none of them seem to work. Find/Replace, Trim, substitute won't work.

    Cell D2
    "*225.00"

    I'm out of ideas.

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,419

    Re: Remove blank space in front of text to turn into a number. Trim, Substitute will not w

    Probably a non breaking space rather than just a "simple" space. Select and copy one of the characters and then use that in your global replace.
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Valued Forum Contributor jtakw's Avatar
    Join Date
    05-05-2018
    Location
    CA, USA
    MS-Off Ver
    2016
    Posts
    668

    Re: Remove blank space in front of text to turn into a number. Trim, Substitute will not w

    Hi,

    Try:

    =SUBSTITUTE(D2,CHAR(160),"")+0

    Remove the +0 at the end of the formula if you Don't want the result converted to Real Number.

  4. #4
    Forum Contributor
    Join Date
    12-13-2013
    Location
    Calgary,AB,Canada
    MS-Off Ver
    2016,O365
    Posts
    236

    Re: Remove blank space in front of text to turn into a number. Trim, Substitute will not w

    =substitute(d2,char(code(left(d2,1))),)-0

  5. #5
    Registered User
    Join Date
    10-26-2015
    Location
    Minnesota
    MS-Off Ver
    2013
    Posts
    2

    Re: Remove blank space in front of text to turn into a number. Trim, Substitute will not w

    =IFERROR(SUBSTITUTE(D3, CHAR(160),"")+0,"")

    This worked ^^^

    You are all my favorite

  6. #6
    Valued Forum Contributor jtakw's Avatar
    Join Date
    05-05-2018
    Location
    CA, USA
    MS-Off Ver
    2016
    Posts
    668

    Re: Remove blank space in front of text to turn into a number. Trim, Substitute will not w

    Glad you got it sorted.

    Add rep would be appreciated, click the "Star" a the lower left corner of the posts you found helpful.

    If your issue is "Solved", please mark the thread as such, Thank You.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Need to trim various prefixed that are in ALL CAPS off of the front of text in a column
    By syncguy in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 10-31-2013, 03:58 PM
  2. remove non-existent space in front of text in excel
    By ewong in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-27-2012, 12:30 PM
  3. [SOLVED] Insert a space in front of all upper case text
    By excelrod in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 09-06-2012, 12:02 PM
  4. [SOLVED] Trim Specific Values and Remove last right space
    By jantonio in forum Excel General
    Replies: 3
    Last Post: 05-02-2012, 08:40 AM
  5. Simple code to locate a word and remove space in front
    By yiannis1925 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 12-13-2011, 10:14 AM
  6. How to remove a space in the front
    By gurp99 in forum Excel General
    Replies: 12
    Last Post: 01-30-2011, 05:21 PM
  7. How to remove space and symbols in front of words
    By Jeff M in forum Excel General
    Replies: 2
    Last Post: 03-26-2009, 12:56 PM
  8. Trim, clean and substitute function do not work for these data
    By radzian in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 08-02-2008, 07:59 AM

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