+ Reply to Thread
Results 1 to 18 of 18

Remove blank in front and back of text , number

  1. #1
    Forum Contributor
    Join Date
    05-09-2015
    Location
    Thailand
    MS-Off Ver
    MS365
    Posts
    303

    Remove blank in front and back of text , number

    Hi Guru,
    Please advise. if i 'd like to remove blank in front of text or number and the end.
    I tried to use Trim , Substitute but not work.
    Please see attachment.
    Thanks.

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,987

    Re: Remove blank in front and back of text , number

    Is this using Excel 2010 or something newer?
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Forum Contributor
    Join Date
    05-09-2015
    Location
    Thailand
    MS-Off Ver
    MS365
    Posts
    303

    Re: Remove blank in front and back of text , number

    Dear Aign,
    i think MS 360.

  4. #4
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,987

    Re: Remove blank in front and back of text , number

    There is no such thing - do you mean MS365?

    Please update your profile NOW to reflect this change. Thanks.

    You have non-breaking spaces. Try copying and pasting this into your cell:

    Please Login or Register  to view this content.
    The space character was entered into the formula by holding down the ALT key and typing 0160 on the numeric keypad, then releasing the ALT key.
    Last edited by AliGW; 07-27-2023 at 03:11 AM. Reason: Workbook added.

  5. #5
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,064

    Re: Remove blank in front and back of text , number

    or:

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

    which has the same effect.
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: Lá fhéile Pádraig sona dhaoibh

  6. #6
    Forum Contributor
    Join Date
    05-09-2015
    Location
    Thailand
    MS-Off Ver
    MS365
    Posts
    303

    Re: Remove blank in front and back of text , number

    Hi Align,
    your formula same with my original formular. It not work.

  7. #7
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,064

    Re: Remove blank in front and back of text , number

    or indeed (no formula dragging), delete all expected results forst:

    =SUBSTITUTE(A2:A4,CHAR(160),"")+0

  8. #8
    Forum Contributor
    Join Date
    05-09-2015
    Location
    Thailand
    MS-Off Ver
    MS365
    Posts
    303

    Re: Remove blank in front and back of text , number

    Hi Align,
    sorry , not same but shown as Value.

  9. #9
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,987

    Re: Remove blank in front and back of text , number

    your formula same with my original formular. It not work.
    No, it is NOT the same. I said this:

    The space character was entered into the formula by holding down the ALT key and typing 0160 on the numeric keypad, then releasing the ALT key.
    AND I provided a workbook to show it working.

    Please look again.

  10. #10
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,987

    Re: Remove blank in front and back of text , number

    sorry , not same but shown as Value.
    Don't know what this means, but you could try:

    Please Login or Register  to view this content.

  11. #11
    Forum Contributor
    Join Date
    05-09-2015
    Location
    Thailand
    MS-Off Ver
    MS365
    Posts
    303

    Re: Remove blank in front and back of text , number

    Hi Glenn Kennedy,
    both formula are work.
    may i ask ? why Char (160) why 160.
    thanks so much.

  12. #12
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,987

    Re: Remove blank in front and back of text , number

    My formula works, too - look at the workbook I provided!

    CHAR(160) is the same as typing ALT+0160. Our formulae do the same thing in a different way character 160 is a non-breaking space (ASCII code 0160).

    If that takes care of your original question, please choose Thread Tools from the menu link above and mark this thread as SOLVED.

    Also, if you have not already done so, you may not be aware that you can thank anyone who offered you help towards a solution for your issue by clicking the small star icon (* Add Reputation) located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of all those who offered help.
    Last edited by AliGW; 07-27-2023 at 03:25 AM.

  13. #13
    Forum Guru HansDouwe's Avatar
    Join Date
    06-21-2022
    Location
    Nederland
    MS-Off Ver
    365 V2403 (Build 17330.20000)
    Posts
    6,435

    Re: Remove blank in front and back of text , number

    There are non breaking spaces before your value and there is a real space behind your value,

    Please try:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Last edited by HansDouwe; 07-27-2023 at 03:27 AM.

  14. #14
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,064

    Re: Remove blank in front and back of text , number

    CHAR 160 is a non-breaking space, commonly used on the www. It can not be removed with TRIM and needs a bit of extra work. It's easier to add it, hard-coded into the formula rather than using ALT-160 which clearly didn't work easily for you.

  15. #15
    Forum Expert CheeseSandwich's Avatar
    Join Date
    12-22-2021
    Location
    Kent, England
    MS-Off Ver
    365 - 2402-17328.20068
    Posts
    1,361

    Re: Remove blank in front and back of text , number

    In Excel, CHAR(160) represents a non-breaking space character.

    A non-breaking space (also known as NBSP) is a special type of space character that prevents the line from breaking at that point. It is commonly used in situations where you want to keep two words or elements together on the same line without allowing a line break between them. This is useful, for example, in preventing awkward line breaks between words or keeping numerical values and their units together.

    It can be common when exporting data from external systems into Excel.
    If things don't change they stay the same

  16. #16
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,448

    Re: Remove blank in front and back of text , number

    Some insight about cleaning "dirty" data https://www.rondebruin.nl/win/s9/win017.htm

  17. #17
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,987

    Re: Remove blank in front and back of text , number

    Marked as SOLVED.

    If you have not already done so, you may not be aware that you can thank anyone who offered you help towards a solution for your issue by clicking the small star icon (* Add Reputation) located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of all those who offered help.

  18. #18
    Forum Contributor
    Join Date
    05-09-2015
    Location
    Thailand
    MS-Off Ver
    MS365
    Posts
    303

    Re: Remove blank in front and back of text , number

    Hi all,
    thanks for all you guy to help me.

+ 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. Remove Front Apostrophe (Text & Numbers)
    By CobraLAD in forum Tips and Tutorials
    Replies: 2
    Last Post: 03-01-2020, 01:01 PM
  2. [SOLVED] Remove blank space in front of text to turn into a number. Trim, Substitute will not work.
    By jaboomgaarden in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 08-15-2018, 05:59 PM
  3. Replies: 4
    Last Post: 09-07-2016, 12:59 PM
  4. Replies: 1
    Last Post: 08-12-2014, 08:52 PM
  5. [SOLVED] How to remove dot(s) .. or ... in front of text string, not in a middle
    By tuongtu3 in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 09-23-2013, 05:45 PM
  6. How to remove leading blank spaces in front of any word in column
    By Launchnet in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 12-21-2011, 12:19 AM
  7. adding text to front and back of entries
    By rota426 in forum Excel General
    Replies: 4
    Last Post: 12-18-2007, 03:07 PM

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