+ Reply to Thread
Results 1 to 4 of 4

Formula to find a specific character in a cell

  1. #1
    Registered User
    Join Date
    05-14-2012
    Location
    Spring Valley, NY
    MS-Off Ver
    Excel 2010
    Posts
    27

    Formula to find a specific character in a cell

    Here's the scenario: the part number is normally 6 digits long, sometimes the part number will be listed in this column again with an alpha character "D" at the end of the of the part number.

    I'm looking to find all the rows where there's a "D" in the 7th position. These are the duplicate records that need to be removed.

    Here's an example:

    Column A, Row 1 has part# 123456
    Column A, Row 2 has part# 123456D

    In Column B I would like create a flag or indicator highlighting all rows that have a "D" after the 6 digits because I will need to remove those rows.

    Column A may have other part numbers in different formats lbut basically the 7th position will have a "D" and these rows need to be identified.

    What formula can I write that will capture this?

    Thank you for reviewing this, I hope I explained what I need

  2. #2
    Forum Expert icestationzbra's Avatar
    Join Date
    01-07-2004
    MS-Off Ver
    2007, 2010
    Posts
    1,421

    Re: Formula to find a specific character in a cell

    put this is B1 and drag down. wherever you see TRUE, the neighbouring cell in Column A has letter "D" in 7th position:

    Please Login or Register  to view this content.
    you could also use this in the Conditional Formatting rules to highlight cells which have "D" in the 7th position.
    - i.s.z -
    CSE, aka Array aka { }, formulae are confirmed with CONTROL+SHIFT+ENTER.
    Replace commas ( , ) with semicolons ( ; ) in formulae, if your locale setting demands.
    All good ideas are courtesy resources from this forum as well as others around the web.
    - e.o.m -

  3. #3
    Forum Expert Ace_XL's Avatar
    Join Date
    06-04-2012
    Location
    UAE
    MS-Off Ver
    2016
    Posts
    6,074

    Re: Formula to find a specific character in a cell

    Try in another column

    =IF(MID(B1,7,1)="D","delete","")

    Filter on "delete" and delete rows
    Life's a spreadsheet, Excel!
    Say thanks, Click *

  4. #4
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: Formula to find a specific character in a cell

    You could highlight the range and do Ctrl+H
    For the Find What - type: ??????D or *D
    For the Replace With - leave it blank
    Then click on Replace All

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

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