+ Reply to Thread
Results 1 to 6 of 6

Removing characters from a cell

  1. #1
    Registered User
    Join Date
    11-28-2006
    Posts
    4

    Removing characters from a cell

    Hello,

    I am trying to trim of characters within a cell on both the left and right sides. My cell value is 21.45 [23.23] and I can remove the one side or the other using (for example) =RIGHT(E10,LEN(E10)-7) to remove the left side characters. My goal is to have a cell that says just 23.23. How can I do both? can I use to formula's in one cell? If so, how? Any other suggestions?

    Thanks,
    Clint

  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
    Hi,

    How about

    =SUBSTITUTE(MID(A1,FIND("[",A1)+1,99),"]","")

    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
    Forum Expert
    Join Date
    12-29-2004
    Location
    Michigan, USA
    MS-Off Ver
    2013
    Posts
    2,208
    If the value of A1 is [23.23], then you can use:
    Please Login or Register  to view this content.
    If the value of A1 is 21.45 [23.23], then try:
    Please Login or Register  to view this content.
    This may return a text string. If you need a value, then use the VALUE function:
    Please Login or Register  to view this content.

  4. #4
    Registered User
    Join Date
    11-28-2006
    Posts
    4

    You guys are fast!

    Thanks Jason, that worked perfectly! thanks a million!

  5. #5
    Forum Expert
    Join Date
    12-29-2004
    Location
    Michigan, USA
    MS-Off Ver
    2013
    Posts
    2,208
    No problem. Glad I could help you out.

  6. #6
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675
    Quote Originally Posted by xtrout
    Hello,

    I am trying to trim of characters within a cell on both the left and right sides. My cell value is 21.45 [23.23] and I can remove the one side or the other using (for example) =RIGHT(E10,LEN(E10)-7) to remove the left side characters. My goal is to have a cell that says just 23.23. How can I do both? can I use to formula's in one cell? If so, how? Any other suggestions?

    Thanks,
    Clint
    If you always have the same number of characters (5) in the same position perhaps

    =MID(E10,8,5)+0

+ 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