+ Reply to Thread
Results 1 to 11 of 11

remove whitespace or tabs

  1. #1
    Registered User
    Join Date
    09-28-2012
    Location
    boston
    MS-Off Ver
    Excel 2010
    Posts
    42

    remove whitespace or tabs

    HI ALL.

    I'm looping through an array and trying to remove any leading or ending whitespace but I can't seem to figure out why it's not working as I get extra values which I believe are hidden TABS. Here is my code below to try and clean the array value . What am I doing wrong.


    Please Login or Register  to view this content.
    "")

  2. #2
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,524

    Re: remove whitespace or tabs

    Does this work?
    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    09-28-2012
    Location
    boston
    MS-Off Ver
    Excel 2010
    Posts
    42

    Re: remove whitespace or tabs

    Just tried and it did not work. AHHHHHHHHH!!

    Tracy

  4. #4
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,524

    Re: remove whitespace or tabs

    How is it not working?

    No change?

    Do you have a line like
    Please Login or Register  to view this content.
    after the line?

    Otherwise I need to see actual string.

  5. #5
    Registered User
    Join Date
    09-28-2012
    Location
    boston
    MS-Off Ver
    Excel 2010
    Posts
    42

    Re: remove whitespace or tabs

    this is what I have while looping. it's a mess.


    Please Login or Register  to view this content.

  6. #6
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,524

    Re: remove whitespace or tabs

    Please Login or Register  to view this content.
    Should do.

  7. #7
    Registered User
    Join Date
    09-28-2012
    Location
    boston
    MS-Off Ver
    Excel 2010
    Posts
    42

    Re: remove whitespace or tabs

    still dont work. What I did was in a text file i simply enter numbers. I would type 22 hit enter then hit tab enter 23 tab tab enter 24. I copied this into my userform and submitted it into an array and get 6 values 3 of them blank because of the tab.


    22

    23


    24

  8. #8
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,524

    Re: remove whitespace or tabs

    Then try
    Please Login or Register  to view this content.
    Add this function somewhere outside above procedure.
    Please Login or Register  to view this content.

  9. #9
    Registered User
    Join Date
    09-28-2012
    Location
    boston
    MS-Off Ver
    Excel 2010
    Posts
    42

    Re: remove whitespace or tabs

    I'll give it a try now and reply back

  10. #10
    Registered User
    Join Date
    09-28-2012
    Location
    boston
    MS-Off Ver
    Excel 2010
    Posts
    42

    Re: remove whitespace or tabs

    still not working

  11. #11
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,524

    Re: remove whitespace or tabs

    Every suggestion I gave is working here, so no idea why it doesn't work at your side.

+ 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