+ Reply to Thread
Results 1 to 3 of 3

Searching for letters in numbers again...

Hybrid View

JakeMann Searching for letters in... 09-09-2013, 11:42 AM
Ace_XL Re: Searching for letters in... 09-09-2013, 11:49 AM
ragulduy Re: Searching for letters in... 09-09-2013, 11:52 AM
  1. #1
    Forum Contributor
    Join Date
    06-20-2012
    Location
    Derby
    MS-Off Ver
    Excel 2010
    Posts
    383

    Searching for letters in numbers again...

    Hi All,

    I have a number that goes 12824PM12. The PM stands for material so I have a formula that looks for the PM and returns the word "material".

    That works fine.

    I also have numbers with just P in it, for example 1234P5

    I wanted to use the same formula to look at the cells with just P in and not PM but it doesn't seem to work.

    The formula I use to look for PM is

    =IF(ISNUMBER(SEARCH("PM",G2)),"Material","")

    By changing the PM to P it will look at everything with a P. How do I get it to ignore a cell with PM in it?

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

    Re: Searching for letters in numbers again...

    Maybe..

    =IF(ISNUMBER(SEARCH("PM",G2)),"Material",IF(ISNUMBER(SEARCH("P",G2)),"your value",""))
    or
    =IF(AND(ISNUMBER(SEARCH("P",G2)),NOT(ISNUMBER(SEARCH("PM",G2)))),"your value","")
    Life's a spreadsheet, Excel!
    Say thanks, Click *

  3. #3
    Forum Expert
    Join Date
    04-22-2013
    Location
    .
    MS-Off Ver
    .
    Posts
    4,418

    Re: Searching for letters in numbers again...

    I suppose you could try something like:
    =IF(AND(ISNUMBER(SEARCH("P",A1)),NOT(MID(A1,SEARCH("P",A1)+1,1)="M")),"Material","")

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. VBA Vlookup error when searching for all numbers as a string, works fine with letters
    By thumpernc24 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-23-2012, 10:06 AM
  2. Parsing Letters and Numbers (And Letters)
    By jontran718 in forum Excel General
    Replies: 6
    Last Post: 01-12-2012, 12:55 PM
  3. Searching cell contents for a combination of letters
    By mangaliso89 in forum Excel General
    Replies: 1
    Last Post: 05-25-2011, 11:46 AM
  4. Replies: 2
    Last Post: 12-01-2010, 02:29 PM
  5. Searching and Sorting a list of data (numbers and letters) in excel
    By bramble in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 04-25-2008, 06:54 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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1