+ Reply to Thread
Results 1 to 6 of 6

Modifying =IF(OR(ISNUMBER(SEARCH Formula To Only Look For Variable Within Part of Cell

  1. #1
    Registered User
    Join Date
    05-21-2014
    Posts
    4

    Question Modifying =IF(OR(ISNUMBER(SEARCH Formula To Only Look For Variable Within Part of Cell

    Hello,

    I am working on an audit template at work and have received some help here before and was hoping someone could help me out again to put the final touch on it. Currently I am using the following formula to look for four variables within a range of text cells and return a modified true/fasle response. =IF(OR(ISNUMBER(SEARCH({"D ","D14","Disco","Discontinued"},H2))),"Sage Discontinued","Sage Active"). The formula works great, except for that first variable D (as a text character with a space after it). This is the primary way our staffers use to indicate that a product is discontinued, but searching on that variable as it stands in the formula is returning a LOT of false positives as many words within the range the formula is searching within end with a D and are followed by a space. Is there a way to modify the formula as it is to search for that D 'space' variable only within the first two characters of the cell? The D14, Disco, and Discontinued variables all need to retain the ability to search through the entire text within the cell.

  2. #2
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Modifying =IF(OR(ISNUMBER(SEARCH Formula To Only Look For Variable Within Part of Cell

    I think you can implement this one in your formula.

    Please Login or Register  to view this content.
    Not very good with array formula's so i can't give you the whole solution.
    Notice my main language is not English.

    I appreciate it, if you reply on my solution.

    If you are satisfied with the solution, please mark the question solved.

    You can add reputation by clicking on the star * add reputation.

  3. #3
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Modifying =IF(OR(ISNUMBER(SEARCH Formula To Only Look For Variable Within Part of Cell

    Pull that argument out from the rest like so

    =IF(OR(ISNUMBER(SEARCH("D ",LEFT(H2,2))),ISNUMBER(SEARCH({"D14","Disco","Discontinued"},H2))),"Sage Discontinued","Sage Active")

    EDIT:
    Or the simpler

    =IF(OR(LEFT(H2,2)="D ",ISNUMBER(SEARCH({"D14","Disco","Discontinued"},H2))),"Sage Discontinued","Sage Active")
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  4. #4
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996

    Re: Modifying =IF(OR(ISNUMBER(SEARCH Formula To Only Look For Variable Within Part of Cell

    Try this regular formula:
    Please Login or Register  to view this content.
    Is that something you can work with?
    Last edited by Ron Coderre; 05-23-2014 at 03:32 PM.
    Ron
    Former Microsoft MVP - Excel (2006 - 2015)
    Click here to see the Forum Rules

  5. #5
    Registered User
    Join Date
    05-21-2014
    Posts
    4

    Re: Modifying =IF(OR(ISNUMBER(SEARCH Formula To Only Look For Variable Within Part of Cell

    Thanks for the quick resposnes all!! Went with ChemistB's solution. Now I can put this thing into full time use. Thanks again!!!

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

    Re: Modifying =IF(OR(ISNUMBER(SEARCH Formula To Only Look For Variable Within Part of Cell

    That formula looks familiar.

    If there should be text after the D[space] to qualify...

    =IF(OR(ISNUMBER(SEARCH({"D ?","D14","Disco","Discontinued"},H2))),"Sage Discontinued","Sage Active")
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

+ 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. Need help with isnumber(search) Formula
    By lpretor in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 11-15-2013, 08:14 PM
  2. [SOLVED] IF -- ISNumber (Search -- help when there is a variable to be excluded and identified
    By richtree in forum Excel Formulas & Functions
    Replies: 13
    Last Post: 05-06-2013, 06:07 PM
  3. using IF(ISNUMBER(SEARCH formula
    By dkmanley in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 10-19-2011, 01:43 PM
  4. Using Variable in Cell Formula as part of For Next
    By grey in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-13-2009, 11:37 AM
  5. Modifying a sumproduct formula to search for words in a cell
    By Weasel in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 07-07-2009, 02:51 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