+ Reply to Thread
Results 1 to 8 of 8

Nested SEARCH or FIND formula query

  1. #1
    Forum Contributor
    Join Date
    08-17-2009
    Location
    West Midlands
    MS-Off Ver
    Excel 2016
    Posts
    213

    Nested SEARCH or FIND formula query

    Morning all

    Could anyone help me with a formula problem? I have a column (column C) of products that are alphanumeric. I'd like to put a formula in column B that looks up whether the value in column C contains "240", "230" OR "350" - not all of them but one or the other.

    I have used the formula below, but is there a way I can nest it to search for the other two values?

    =IF(ISERROR(SEARCH("240",C5)),"No","Yes")

    Any help would be greatly appreciated.

    Steve
    Last edited by SAsplin; 07-15-2011 at 06:10 AM.

  2. #2
    Valued Forum Contributor
    Join Date
    10-13-2010
    Location
    Sunderland, England
    MS-Off Ver
    Excel 2007 (Home) / 2003 (Work)
    Posts
    740

    Re: Nested SEARCH or FIND formula query

    =IF(ISERROR(SEARCH("240",C5)),IF(ISERROR(SEARCH("230",C5)),IF(ISERROR(SEARCH("350",C5)),"No",350),230),240)

    Does that work?

  3. #3
    Valued Forum Contributor
    Join Date
    05-23-2011
    Location
    Lahore PK
    MS-Off Ver
    Excel 2007, 2013
    Posts
    627

    Re: Nested SEARCH or FIND formula query

    Hi

    try this formula

    =MATCH(TRUE,ISNUMBER(SEARCH({240,230,250},C5)),0)

    it is an array formula and should be confirmed through Ctrl+Shift+Entre

    than use if formula to get No or Yes

    you could also define a range of above vaue i.e., 240,230,250 sepretly and give the that range in the above formula
    Last edited by Azam Ali; 07-15-2011 at 05:50 AM.

  4. #4
    Forum Expert
    Join Date
    12-03-2009
    Location
    Florence, Italy
    MS-Off Ver
    Excel 2019
    Posts
    1,796

    Re: Nested SEARCH or FIND formula query

    Hi,

    a possible solution

    =IF(SUMPRODUCT(--ISNUMBER(FIND({230,240,250},C5))),"Yes";"No")
    Regards

  5. #5
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,607

    Re: Nested SEARCH or FIND formula query

    How about this:

    =IF(SUMPRODUCT(COUNTIF(C5,"*"&{230, 240, 350}&"*"))>0, "YES", "NO")

  6. #6
    Forum Contributor
    Join Date
    08-17-2009
    Location
    West Midlands
    MS-Off Ver
    Excel 2016
    Posts
    213

    Re: Nested SEARCH or FIND formula query

    Thanks for that. Yes, this returns which are 230's, 240's and 350's - is there any way to just get a 'Yes'?

  7. #7
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,607

    Re: Nested SEARCH or FIND formula query

    In any solution you choose: Instead of "NO" leave just quotations "". That will give you (nothing) between ""

  8. #8
    Forum Contributor
    Join Date
    08-17-2009
    Location
    West Midlands
    MS-Off Ver
    Excel 2016
    Posts
    213

    Re: Nested SEARCH or FIND formula query

    Zbor, that formula's a great shout! Works like a charm.

    Many thanks

    Steve

+ 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