+ Reply to Thread
Results 1 to 5 of 5

VBA or formula for Remove space begin and end of Each line Text Data

  1. #1
    Registered User
    Join Date
    11-22-2016
    Location
    INDIA
    MS-Off Ver
    EXCEL 2003,2007
    Posts
    8

    VBA or formula for Remove space begin and end of Each line Text Data

    Hello All
    We got few file from our client in those file have large nos of records..
    in this file colum B has text data by mistake in few records matter start after a [SPACE] and few record after end [SPACE]
    we want a formula to remove those space if in start or in after end
    for eg data in following type
    provincial divison kanpur link road
    we want this data is fllowing type
    provincial divison kanpur link road


    karankumar atraulia link road[space]

    we want this data is fllowing type
    karankumar atraulia link road

    thanks in advance

    Pankaj

  2. #2
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: VBA or formula for Remove space begin and end of Each line Text Data

    Maybe:

    Please Login or Register  to view this content.

  3. #3
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,920

    Re: VBA or formula for Remove space begin and end of Each line Text Data

    TRIM() should do it both in VBA and on the sheets.
    One spreadsheet to rule them all. One spreadsheet to find them. One spreadsheet to bring them all and at corporate, bind them.

    A picture is worth a thousand words, but a sample spreadsheet is more likely to be worked on.

  4. #4
    Forum Expert
    Join Date
    10-06-2008
    Location
    Canada
    MS-Off Ver
    2007 / 2013
    Posts
    5,525

    Re: VBA or formula for Remove space begin and end of Each line Text Data

    Another possibility maybe.
    Change Range reference as required.
    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    12-06-2016
    Location
    India
    MS-Off Ver
    2007
    Posts
    72

    Re: VBA or formula for Remove space begin and end of Each line Text Data

    Hi,

    Use Clean(trim("A1")) and drag down till end this will remove all trailing spaces

+ 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 Line break space
    By ganeshkumar in forum Excel General
    Replies: 1
    Last Post: 03-31-2016, 06:03 PM
  2. How to remove an extra space at the end of the line?
    By EnCECU in forum Excel General
    Replies: 2
    Last Post: 03-01-2014, 04:37 PM
  3. [SOLVED] how to remove break line space...
    By ganeshkumar in forum Excel General
    Replies: 3
    Last Post: 12-12-2013, 08:57 AM
  4. Text Filter-begin With... (multiple Begin Withs?)
    By hariexcel1987 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 08-02-2013, 02:12 PM
  5. Replies: 1
    Last Post: 02-01-2013, 01:57 AM
  6. Remove all characters before space in line
    By gartie in forum Excel General
    Replies: 9
    Last Post: 08-29-2012, 05:52 PM
  7. Text Filter-Begin with... (multiple begin withs?)
    By flyflipper in forum Excel - New Users/Basics
    Replies: 1
    Last Post: 06-16-2010, 06:29 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