Consulting

Results 1 to 3 of 3

Thread: Is it possible to automatically removes spaces, commas, and delimiters using VBA?

  1. #1
    VBAX Mentor
    Joined
    Aug 2010
    Posts
    457
    Location

    Is it possible to automatically removes spaces, commas, and delimiters using VBA?

    Hi experts,

    Is it possible to automatically removes spaces, commas, and delimiters using visual basic code when data from a txt files, csv.files etc has been imported into Excel?
    Once that is done I will like to devise a system for importing and reconfiguring the data automatically or semi-automatically (people running macros for example). Can this be done, if so how? Would you have any examples of code, strategies you may worked on in a similar project or websites? I am a beginner/intermediate user of visual basic, so the sources or information you display to me will be very useful...

    Thanks for your contributions

  2. #2
    I like my own article on importing text files as a start, although it doesn't answer your question:
    www.jkp-ads.com/articles/importtext.asp
    For the cleansing of the data, why not record a macro while performing some of the steps, e.g. doing a search and replace to replace double spaces. It should get you a head start?
    Regards,

    Jan Karel Pieterse
    Excel MVP jkp-ads.com

  3. #3
    VBAX Guru Kenneth Hobs's Avatar
    Joined
    Nov 2005
    Location
    Tecumseh, OK
    Posts
    4,956
    Location
    It is best to work up short example files to get the best help. There are many ways to do it. Most want the delimiters for various import methods.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •