+ Reply to Thread
Results 1 to 4 of 4

A quicker way to trim?

  1. #1
    Forum Contributor
    Join Date
    06-22-2011
    Location
    somerset
    MS-Off Ver
    365
    Posts
    328

    A quicker way to trim?

    I have some csv data output as a text file with some (loads of) extra spaces in it. I can get a find replace loop to take out all the double spaces in the range almost instantly:
    Please Login or Register  to view this content.
    however once that is done all the cells still have a preceeding space so i use:
    Please Login or Register  to view this content.
    which takes ages to run as it is cycling through a lot of cells, anyone know of a way to speed this up? maybe some way of aplying trim to a range rather than one cell at a time.

  2. #2
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643
    Add an extra column, fill it with trim formulas that refer to the description column.

    Then copy the new column and paste special values over the description column.

    Finally delete the new column.
    If posting code please use code tags, see here.

  3. #3
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: A quicker way to trim?

    A couple of days ago, similar request was asked and Nilem came up with these few lines. This is not my code.

    Please Login or Register  to view this content.

  4. #4
    Forum Expert JasperD's Avatar
    Join Date
    05-07-2013
    Location
    Netherlands
    MS-Off Ver
    Excel 2016
    Posts
    1,393

    Re: A quicker way to trim?

    Try setting at the top of your code :
    Please Login or Register  to view this content.
    and then at the end of your code

    Please Login or Register  to view this content.
    Please click the * below if helps
    Please click the * below if this helps

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

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