+ Reply to Thread
Results 1 to 2 of 2

Deleting specific characters

  1. #1
    Registered User
    Join Date
    02-24-2011
    Location
    Phoenix, AZ
    MS-Off Ver
    Excel 2011
    Posts
    1

    Deleting specific characters

    I have a specific issue that I'm trying to figure out. I'm sure there's a way to do this (perhaps even some terminology I may not be familiar with) so hoping to find some assistance.

    I have an excel with 10,000 line items. each cell has series of numbers:

    113320_150752
    113320_150752_123hjsdf
    113320_150752_2349728
    113320_150752_
    113169_14223_

    Above is a small sampling. However, I need to be able to scan through a list of 10,000 of these (each in their own cell) and remove the second underscore IF there is nothing following it.

    So in the above example, the 4th line, I need to be able to remove the "_" after 150752 because there's no characters following it. Same with line 5.

    I can't do a find/replace, as I don't want to mess with any underscore unless it meets that specific criteria. Is there a formula, or macro that can be built for this? It's something I do daily.

    Thanks for any help!

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

    Re: Deleting specific characters

    One way with formula:

    =LEFT(A1,LEN(A1)-(RIGHT(A1)="_"))

    copied down where A1 contains first original string

    then you can copy column and paste special >> Values over the original.
    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.

+ 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