+ Reply to Thread
Results 1 to 7 of 7

Macro to clean up extra unwanted spaces

  1. #1
    Forum Contributor
    Join Date
    01-04-2014
    Location
    East Africa
    MS-Off Ver
    MS OFFICE 2019 PRO
    Posts
    3,648

    Macro to clean up extra unwanted spaces

    Kindly notice the spaces infront of the description

    macro required , also need to know how it works with
    formula too
    Attached Files Attached Files

  2. #2
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Macro to clean up extra unwanted spaces

    Hi makinmomb

    I don't know where I got this Code but you're welcome to it
    Please Login or Register  to view this content.
    I don't know what this means
    also need to know how it works with
    formula
    John

    If you have issues with Code I've provided, I appreciate your feedback.

    In the event Code provided resolves your issue, please mark your Thread as SOLVED.

    If you're satisfied by any members response to your issue please use the star icon at the lower left of their post.

  3. #3
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2407 Win 11 Home 64 Bit
    Posts
    24,084

    Re: Macro to clean up extra unwanted spaces

    Formula
    In C1 type =TRIM(B1) and copy down.

    VBA

    Please Login or Register  to view this content.
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  4. #4
    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
    45,270

    Re: Macro to clean up extra unwanted spaces

    Please Login or Register  to view this content.

    Regards, TMS
    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


  5. #5
    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
    45,270

    Re: Macro to clean up extra unwanted spaces

    I notice that you have accessed the board a couple of times since these solutions were provided. Do they meet your needs?



    If you are satisfied with the solution(s) provided, please mark your thread as Solved.


    New quick method:
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

    Or you can use this way:

    How to mark a thread Solved
    Go to the first post
    Click edit
    Click Go Advanced
    Just below the word Title you will see a dropdown with the word No prefix.
    Change to Solved
    Click Save


    You may also want to consider thanking those people who helped you by clicking on the little star at the bottom left of their reply to your question.

  6. #6
    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
    45,270

    Re: Macro to clean up extra unwanted spaces

    Or, another yet shorter option:

    Please Login or Register  to view this content.

    Regards, TMS

  7. #7
    Forum Contributor
    Join Date
    01-04-2014
    Location
    East Africa
    MS-Off Ver
    MS OFFICE 2019 PRO
    Posts
    3,648

    Re: Macro to clean up extra unwanted spaces

    I mark all threads solved , I use this commonly ,
    I also add reputation to most answers and I use
    these as daily work tools , I have only been busy
    this morn since we have a gigantic sale starting
    tomorrow

    TMS the macro works super fine , thanks , I also
    saved to my collection the trim of alansidman , short
    and sweet

+ 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. VBA Macro to export cells to text file and add extra spaces
    By kmfdm515 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 10-08-2013, 03:50 AM
  2. [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
  3. Replies: 8
    Last Post: 12-17-2012, 05:30 AM
  4. Can't 'trim' or 'clean' spaces
    By [email protected] in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 02-05-2010, 07:06 PM
  5. clean data - Removing Unwanted characters
    By theghost in forum Excel General
    Replies: 2
    Last Post: 02-25-2007, 02:48 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