+ Reply to Thread
Results 1 to 12 of 12

finding letters within numbers and returning words

  1. #1
    Forum Contributor
    Join Date
    06-20-2012
    Location
    Derby
    MS-Off Ver
    Excel 2010
    Posts
    381

    finding letters within numbers and returning words

    Hi All,

    I have a number for example 33034P7 in cell A1

    In B1 if the value in A1 has a P in it I want it to return the word "Finished Goods"

    I have been experimenting with the below formula but can't get it to work. Any suggestions?

    =IF(ISNUMBER(SEARCH("P",A1,)),"Finished Goods","")

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,726

    Re: finding letters within numbers and returning words

    You have a comma in there that you don't need:

    =IF(ISNUMBER(SEARCH("P",A1)),"Finished Goods","")

    otherwise it looks okay to me.

    Pete

  3. #3
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: finding letters within numbers and returning words

    =IF(ISNUMBER(SEARCH("P",A1,)),"Finished Goods","")

    No nned of the comma there--Red bold_
    Regards

    Fotis.

    -This is my Greek whisper to Europe.

    --Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

    Advanced Excel Techniques: http://excelxor.com/

    --KISS(Keep it simple Stupid)

    --Bring them back.

    ---See about Acropolis of Athens.

    --Visit Greece.

  4. #4
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: finding letters within numbers and returning words

    Remove the comma after A1...

    =IF(ISNUMBER(SEARCH("P",A1)),"Finished Goods","")

    Here's another way...

    =IF(COUNTIF(A1,"*P*"),"Finished Goods","")
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  5. #5
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: finding letters within numbers and returning words

    Try

    =IF(ISNUMBER(SEARCH("P",A1,1)),"Finished Goods","")
    or just
    =IF(ISNUMBER(SEARCH("P",A1)),"Finished Goods","")

  6. #6
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,167

    Re: finding letters within numbers and returning words

    How about
    =IFERROR(IF(FIND("P",A1)>0,"Finished Goods",""),"")
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  7. #7
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,726

    Re: finding letters within numbers and returning words

    Something wrong with the Forum today - none of these replies show up on the list of New Posts, and my post count hasn't increased. It has happened with several of my posts today.

    Pete

  8. #8
    Valued Forum Contributor
    Join Date
    10-26-2008
    Location
    Birmingham, UK
    MS-Off Ver
    All versions up to 2010
    Posts
    1,025

    Re: finding letters within numbers and returning words

    Hi
    Try this formula:

    =IF(ISNUMBER(FIND("P",A1,1)),"Finished Goods","")

    Good luck.
    Tony

  9. #9
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: finding letters within numbers and returning words

    Yeah, I also noticed that but it seems to have updated in the last few minutes.

  10. #10
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: finding letters within numbers and returning words

    Pete,

    Its showing correctly in the New posts now. Maybe just a small glitch. We already faced a hacking attack today. This could be one of the after-effects.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

  11. #11
    Forum Contributor
    Join Date
    06-20-2012
    Location
    Derby
    MS-Off Ver
    Excel 2010
    Posts
    381

    Re: finding letters within numbers and returning words

    Brilliant, thanks everyone.

  12. #12
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: finding letters within numbers and returning words

    You're welcome. We appreciate the feedback!

+ 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. Replies: 1
    Last Post: 08-15-2013, 06:07 PM
  2. [SOLVED] I need a macro that allows only lists of numbers and not letters or words
    By denisirio in forum Excel Programming / VBA / Macros
    Replies: 16
    Last Post: 10-24-2012, 12:01 PM
  3. Formula Finding String with Specific Letters and Numbers
    By jpedges38 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 07-06-2012, 08:56 PM
  4. Finding the hidden words in strings of letters
    By Hitch75 in forum Excel General
    Replies: 12
    Last Post: 07-14-2011, 06:32 AM
  5. Finding most common occurence of values in cells containing letters and numbers
    By sparklyballs in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 08-18-2006, 07:20 AM

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