+ Reply to Thread
Results 1 to 7 of 7

Delete leading and trailing periods

  1. #1
    Registered User
    Join Date
    06-04-2009
    Location
    NYC USA
    MS-Off Ver
    Excel 2003
    Posts
    4

    Delete leading and trailing periods

    I have a spreadsheet with numbers of various lengths.

    Sometimes they are preceded with a period and have one at the end as well.

    Examples: of their present state

    .11110000.111111.000000.

    111111.1111111.000000.

    100000.000000.0000.110001.


    Examples: of desired state

    10000.111111.000000

    111111.1111111.000000

    100000.000000.0000.110001


    Is their a way I can create a new column
    and insert a formula, then drag it down so that it will delete the first or last character, if the character is a period?

    Thanks in advance

    Dave
    Last edited by NBVC; 06-04-2009 at 12:32 PM.

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Delete leading and trailing periods

    Try:

    Please Login or Register  to view this content.
    copied down.. where A1 contains first number to parse
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Registered User
    Join Date
    06-04-2009
    Location
    NYC USA
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: Delete leading and trailing periods

    NBVC:

    Thanks for your reply it works but leaves carriage returns on the trailing
    number if no period is present.

    I can scrub it with a clean function after using your formula.

    Thanks again,

    Dave

  4. #4
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Delete leading and trailing periods

    Try then:

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    06-04-2009
    Location
    NYC USA
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: Delete leading and trailing periods

    Many thanks,

    that works quite well.

    Regards,

    Dave

  6. #6
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Delete leading and trailing periods

    If you are satisfied with the solution(s) provided, please mark your thread as Solved.

    How to mark a thread Solved
    Go to the first post
    Click edit
    Click Go Advanced
    Just below the word Title you will see a dropdown with the word No prefix.
    Change to Solved
    Click Save

  7. #7
    Banned User!
    Join Date
    10-14-2006
    Posts
    1,211

    Re: Delete leading and trailing periods

    Quote Originally Posted by evildave View Post
    I have a spreadsheet with numbers of various lengths.

    Sometimes they are preceded with a period and have one at the end as well.

    Examples: of their present state

    .11110000.111111.000000.

    111111.1111111.000000.

    100000.000000.0000.110001.


    Examples: of desired state

    10000.111111.000000

    111111.1111111.000000

    100000.000000.0000.110001


    Is their a way I can create a new column
    and insert a formula, then drag it down so that it will delete the first or last character, if the character is a period?

    Thanks in advance

    Dave
    Try this:

    =SUBSTITUTE(TRIM(SUBSTITUTE(A1,"."," "))," ",".")

+ 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