Results 1 to 3 of 3

Thread: How to remove characters between Cell values in Microsoft Excel

  1. #1
    Join Date
    Oct 2011
    Posts
    90

    How to remove characters between Cell values in Microsoft Excel

    I have a column of cells that have excess data which needs to be removed. The #of characters vary. I'm needing a formula to delete all the characters that precede the 2nd hyphen as well as delete the 2nd hyphen. Ex. [ABC-12345-12345]. I need the cell to read [12345]. Can anyone provide a formula that can remove this data.

  2. #2
    Join Date
    Jul 2011
    Posts
    634

    Re: How to remove characters between Cell values in Microsoft Excel

    Presuming your data in A1 down looks like this: ABC-12345-12344, ABC-12345-12355, etc. In B1: =MID(A1,SEARCH("-",A1,SEARCH("-",A1)+1)+1,99)+0

    Copy down to return the numbers after the 2nd hyphen as real numbers, which can be : 12344, 12355, etc,

  3. #3
    Join Date
    Jun 2011
    Posts
    635

    Re: How to remove characters between Cell values in Microsoft Excel

    Assuming that your brackets [ ] are not really part of the value, then:=MID(A1,FIND(CHAR(1),SUBSTITUTE(A1,"-",CHAR(1),2))+1,255) will return everything after the 2nd hyphen. If you always want to keep the characters after the last (no matter how many) hyphen and you don't have to use a formula, you could use: Select the range to fix edit > replace what: *- (asterisk, hyphen) with: (leave blank) and click on replace all.

Similar Threads

  1. Replies: 3
    Last Post: 14-01-2014, 09:44 AM
  2. How to round-off nearest currently values in Microsoft Excel
    By Dvimida in forum MS Office Support
    Replies: 4
    Last Post: 25-01-2012, 06:22 PM
  3. How to remove the decimal point for cell in Microsoft Excel
    By Kungfu Pandey in forum MS Office Support
    Replies: 1
    Last Post: 14-01-2012, 06:20 PM
  4. How to Remove special characters from Microsoft Excel
    By Celestial in forum MS Office Support
    Replies: 6
    Last Post: 13-01-2012, 05:02 PM
  5. Replies: 3
    Last Post: 31-12-2011, 04:59 PM

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
  •  
Page generated in 1,717,911,466.47743 seconds with 17 queries