+ Reply to Thread
Results 1 to 2 of 2

trim macro not working properly on large file

  1. #1
    Registered User
    Join Date
    05-13-2008
    Posts
    14

    trim macro not working properly on large file

    I am trying to incorporate a few macros to clean data files before importing them to Access. The code below is used for the trim function and it appears to run with no errors, however in checking the data it is not removing the spaces from all of the worksheet. I've tested it on a small sample worksheet with only a few entries and it works - but on a large file such as 1895 rows and 30 columns it is not working.

    The record that made me aware it was not working properly is at record 1790 column 11 - there are 2 extra spaces preceeding the text.

    I thought the spaces may have been a char(160) so I used the trim function just on this one cell (row 1790 and column 11) and it worked, so I'm pretty sure it's regular spaces.

    Any suggestions would be greatly appreciated!

    Please Login or Register  to view this content.

  2. #2
    Registered User
    Join Date
    05-13-2008
    Posts
    14
    I think I fixed it.... I changed the cell formatting from "General" to "Text" and it seems to have done the trick!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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