+ Reply to Thread
Results 1 to 5 of 5

How to remove extra spaces from copies string from mail body

  1. #1
    Forum Expert shukla.ankur281190's Avatar
    Join Date
    05-17-2014
    Location
    Lucknow, India
    MS-Off Ver
    Office 365
    Posts
    3,935

    How to remove extra spaces from copies string from mail body

    Hi,

    I hope you all are well.

    I am facing extra space problem with my data copied from mail text body.

    I did many things like trim,substitute & replace. only replace function work but unable to fix num char.

    Sample file is attached for your needful action pls.

    Thanks

    Ankur
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    02-22-2013
    Location
    London, UK
    MS-Off Ver
    Office 365
    Posts
    1,218

    Re: How to remove extra spaces from copies string from mail body

    Try,

    Q2: =SUBSTITUTE($N2,CHAR(160),"")

    or in N2,

    =IFERROR($J2*SUBSTITUTE($N2,CHAR(160),""),"")

    and drag/copy down.


    Best,
    berlan
    Last edited by berlan; 08-14-2015 at 03:09 AM.

  3. #3
    Forum Expert
    Join Date
    08-12-2012
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2010
    Posts
    5,636

    Re: How to remove extra spaces from copies string from mail body

    the blank space is Code 160

    so formula
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    or find and replace with CTRL+H method

    CTRL+H to display Find/Replace dialog
    Find: ALT+160 (Hold the ALT key and enter numbers via numeric keypad)
    Replace: <leave blank>
    Last edited by humdingaling; 08-14-2015 at 03:09 AM. Reason: double post
    If you are satisfied with the solution(s) provided, please mark your thread as Solved.
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

  4. #4
    Forum Expert NeedForExcel's Avatar
    Join Date
    03-16-2013
    Location
    Pune, India
    MS-Off Ver
    Excel 2016:2019, MS 365
    Posts
    3,873

    Re: How to remove extra spaces from copies string from mail body

    Try

    =SUBSTITUTE(N2,CHAR(160),"")+0 (+0 to convert it back to a number)

    Add If error if required

    =IFERROR(SUBSTITUTE(N2,CHAR(160),"")+0,0)
    Cheers!
    Deep Dave

  5. #5
    Forum Expert shukla.ankur281190's Avatar
    Join Date
    05-17-2014
    Location
    Lucknow, India
    MS-Off Ver
    Office 365
    Posts
    3,935

    Re: How to remove extra spaces from copies string from mail body

    Thank you all. But i was using " " instead of Char(160). Why Substitute function didn't work??
    Last edited by shukla.ankur281190; 08-14-2015 at 03:18 AM.

+ 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 VBA to remove extra spaces either end of a cell
    By frootloop in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 07-17-2015, 10:31 AM
  2. How to remove extra spaces in a cell
    By Terressa in forum Excel General
    Replies: 3
    Last Post: 06-23-2015, 05:16 AM
  3. how to remove extra spaces
    By sabubakaralis in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 04-02-2015, 12:14 PM
  4. [SOLVED] Macro to remove extra spaces in an Excel File
    By Ardiko in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-15-2013, 10:33 AM
  5. Remove extra spaces from columns
    By kre30a in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-21-2013, 08:53 AM
  6. How to use vba to remove extra spaces between words
    By Joe Walsh in forum Excel Programming / VBA / Macros
    Replies: 16
    Last Post: 08-09-2013, 09:37 AM
  7. Remove extra spaces
    By kanezfan in forum Excel General
    Replies: 1
    Last Post: 07-05-2007, 02:06 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