+ Reply to Thread
Results 1 to 7 of 7

Remove extra spaces in each line in a cell

  1. #1
    Forum Contributor
    Join Date
    06-29-2014
    Location
    India
    MS-Off Ver
    2010 Windows 10 64 bits
    Posts
    1,269

    Remove extra spaces in each line in a cell

    Hi friends,
    I have addresses in cells which has more than 1 line. I don't want any extra space before or after any word/line.

    The code is working fine if there is only one line in the cell but if there are more than 1 line it's not working as per requirement.

    Any help will be highly appreciated.

    Thanking you,
    Attached Files Attached Files
    Sincerely,

    mso3

  2. #2
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,514

    Re: Remove extra spaces in each line in a cell

    Try
    Please Login or Register  to view this content.

  3. #3
    Forum Expert
    Join Date
    12-24-2007
    Location
    Alsace - France
    MS-Off Ver
    MS 365 Office Suite
    Posts
    5,066

    Re: Remove extra spaces in each line in a cell

    Try
    Please Login or Register  to view this content.
    - Battle without fear gives no glory - Just try

  4. #4
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,882

    Re: Remove extra spaces in each line in a cell

    I can't post my code here .. I got error page ..Why?

    URL: http://www.excelforum.com/editpost.p...post&p=4163620
    Your Browser: Mozilla/5.0 (Windows NT 6.1; rv:38.0) Gecko/20100101 Firefox/38.0
    Block ID: SQLi17
    Block reason: SQL injection was detected and blocked.
    Time: Sun, 16 Aug 2015 03:49:23 -0400
    Server ID: cp448
    Attached Files Attached Files
    Last edited by YasserKhalil; 08-16-2015 at 03:52 AM.
    < ----- Please click the little star * next to add reputation if my post helps you
    Visit Forum : From Here

  5. #5
    Forum Contributor
    Join Date
    06-29-2014
    Location
    India
    MS-Off Ver
    2010 Windows 10 64 bits
    Posts
    1,269

    Re: Remove extra spaces in each line in a cell

    Hi Jindon,
    Excellent! Perfect, It's removing all extra spacesses in all lines as per requirement.

    Hi PCI,
    No, it's not removing all spaces in all lines. Don't mind.

    Thank you to both of you for your kind cooperation to solve the problem.

    Thank you and have a nice day.

  6. #6
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,514

    Re: Remove extra spaces in each line in a cell

    You are welcome and thanks for the rep.

  7. #7
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,882

    Re: Remove extra spaces in each line in a cell

    Have you tested the code in post 4?

+ 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 leading and trailing spaces in each new line break in cell
    By halo12 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-29-2015, 07:10 AM
  2. [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
  3. How to remove extra spaces in a cell
    By Terressa in forum Excel General
    Replies: 3
    Last Post: 06-23-2015, 05:16 AM
  4. how to remove extra spaces
    By sabubakaralis in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 04-02-2015, 12:14 PM
  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