+ Reply to Thread
Results 1 to 6 of 6

Trim, clean and substitute function do not work for these data

Hybrid View

  1. #1
    Registered User
    Join Date
    07-29-2008
    Location
    Japan
    Posts
    13

    Trim, clean and substitute function do not work for these data

    Hi ....

    I have tried to trim, clean and substitute data. However, it seems that the function does not work on these data.

    I attached the samples data in this thread. The data to be cleaned is in column A

    Advice and help is very much appreciated. Thanks.
    Attached Files Attached Files

  2. #2
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    Try

    =LEFT(A2,LEN(A2)-1)
    Pastespecial values to convert to numbers

    VBA Noob
    _________________________________________


    Credo Elvem ipsum etian vivere
    _________________________________________
    A message for cross posters

    Please remember to wrap code.

    Forum Rules

    Please add to your signature if you found this link helpful. Excel links !!!

  3. #3
    Registered User
    Join Date
    07-29-2008
    Location
    Japan
    Posts
    13
    VBA Noob,

    Thanks, great , it works .

    What LEFT function do to these data ? .. to understand my data problem.

  4. #4
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    The left function combine with len function returns all cells to the left of the number of characters -1 e.g ignore the last character

    I tried again. By copying the blank character at the end of A2 and adding to the formula below it worked ok

    =SUBSTITUTE(A2,"*","")
    Edit. The blank at the end appears to be a * not a blank which is why your formula didn't work
    or try
    =SUBSTITUTE(A2,CHAR(160),"")
    See attachment (Please save attachments next time as xl2000)

    VBA Noob
    Attached Files Attached Files
    Last edited by VBA Noob; 08-02-2008 at 07:41 AM.

  5. #5
    Registered User
    Join Date
    07-29-2008
    Location
    Japan
    Posts
    13
    VBANoob

    Thank you. That is fast help.

    I have been figuring out the problem including , what character it is for this one day... but you solve it only in 5 minutes .

    I really appreciate your help.

  6. #6
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    radzian,

    Your welcome

    VBA Noob

+ 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