+ Reply to Thread
Results 1 to 13 of 13

Combine "Does Not Contain" with A Sumproduct (Isnumber(Search Formula

  1. #1
    Registered User
    Join Date
    07-24-2007
    Posts
    66

    Combine "Does Not Contain" with A Sumproduct (Isnumber(Search Formula

    This is the formula I was given yesterday and it works perfectly to find specific words in another column. However, It's pulling false positives due to a string of letters looking like it's one of the retailers I track. For example I track AMC, but I have a quote that has GVAMC so I get a TRUE. How can I add into the formula below to exclude "GVAMC" specifically and not "AMC"?

    =SUMPRODUCT(--ISNUMBER(SEARCH(Retailers_Tracked,A3,1)/LEN(Retailers_Tracked)))>0
    Attached Files Attached Files
    Last edited by amy22x3; 11-03-2017 at 11:04 AM.

  2. #2
    Forum Expert 63falcondude's Avatar
    Join Date
    08-22-2016
    Location
    USA
    MS-Off Ver
    365
    Posts
    6,266

    Re: Combine "Does Not Contain" with A Sumproduct (Isnumber(Search Formula

    Try adding spaces around the search words, i.e.:

    =SUMPRODUCT(--ISNUMBER(SEARCH(" "&Retailers_Tracked&" ",A2,1)/LEN(Retailers_Tracked)))>0

  3. #3
    Registered User
    Join Date
    07-24-2007
    Posts
    66

    Re: Combine "Does Not Contain" with A Sumproduct (Isnumber(Search Formula

    That works if my keyword is somewhere in the middle, but if the Quote starts with my retailer name, it gives a false.
    Attached Files Attached Files

  4. #4
    Forum Expert 63falcondude's Avatar
    Join Date
    08-22-2016
    Location
    USA
    MS-Off Ver
    365
    Posts
    6,266

    Re: Combine "Does Not Contain" with A Sumproduct (Isnumber(Search Formula

    That changes the criteria.

    This will work if your spacing format is consistent (i.e. there is not a dash directly next to the name):

    =SUMPRODUCT(--ISNUMBER(SEARCH(" "&Retailers_Tracked&" "," "&A2&" ",1)/LEN(Retailers_Tracked)))>0

  5. #5
    Valued Forum Contributor
    Join Date
    12-01-2016
    Location
    Planet Earth
    MS-Off Ver
    95 - 2016
    Posts
    343

    Re: Combine "Does Not Contain" with A Sumproduct (Isnumber(Search Formula

    Give this a try
    =SUMPRODUCT(--ISNUMBER(SEARCH("*"&Retailers_Tracked&"*",A9,1)/LEN(Retailers_Tracked)))>0

  6. #6
    Registered User
    Join Date
    07-24-2007
    Posts
    66

    Re: Combine "Does Not Contain" with A Sumproduct (Isnumber(Search Formula

    I can't control the data, that's my problem. We have dozens of quote specialists that are supposed to enter information in an exact way, but being human, they don't. And since I'm so far down the line from them they don't understand the impact of sloppy typing. Re-training doesn't work because they always revert back to bad habits. However, I have figured out that specific words come up a lot like Masonic and since Sonic is a retailer I get a false positive. So I created something like this to work around the known problem words and I figure I'll just have to keep updating the spreadsheet, but I was hoping I could just have one formula that adds the two formulas into one.
    Attached Files Attached Files

  7. #7
    Forum Expert 63falcondude's Avatar
    Join Date
    08-22-2016
    Location
    USA
    MS-Off Ver
    365
    Posts
    6,266

    Re: Combine "Does Not Contain" with A Sumproduct (Isnumber(Search Formula

    Try this:

    =SUMPRODUCT(--ISNUMBER(SEARCH(" "&SUBSTITUTE(Retailers_Tracked,"-","")&" "," "&SUBSTITUTE(A2,"-","")&" ",1)/LEN(Retailers_Tracked)))>0

  8. #8
    Registered User
    Join Date
    07-24-2007
    Posts
    66

    Re: Combine "Does Not Contain" with A Sumproduct (Isnumber(Search Formula

    This is SOO close to perfect! But I've found 2 false positives due to spacing or the lackthereof. I have McDonald's that has a ( in front with no spacing and a hyphen in another word with no spacing. Honda-Penske is showing false when it should be true. Can you adjust for that?

  9. #9
    Forum Expert 63falcondude's Avatar
    Join Date
    08-22-2016
    Location
    USA
    MS-Off Ver
    365
    Posts
    6,266

    Re: Combine "Does Not Contain" with A Sumproduct (Isnumber(Search Formula

    If you update your sample from post #3 to include the new search words and strings that are not working as expected, I'll take a look.

  10. #10
    Registered User
    Join Date
    07-24-2007
    Posts
    66

    Re: Combine "Does Not Contain" with A Sumproduct (Isnumber(Search Formula

    Thank you.
    Attached Files Attached Files

  11. #11
    Forum Expert 63falcondude's Avatar
    Join Date
    08-22-2016
    Location
    USA
    MS-Off Ver
    365
    Posts
    6,266

    Re: Combine "Does Not Contain" with A Sumproduct (Isnumber(Search Formula

    It's getting ugly, but this worked for the sample given in post #10:

    =SUMPRODUCT(--ISNUMBER(SEARCH(" "&SUBSTITUTE(Retailers_Tracked,"-"," ")&" "," "&SUBSTITUTE(SUBSTITUTE(A3,"-"," "),"("," ")&" ",1)/LEN(Retailers_Tracked)))>0

  12. #12
    Registered User
    Join Date
    07-24-2007
    Posts
    66

    Re: Combine "Does Not Contain" with A Sumproduct (Isnumber(Search Formula

    Ugly? It's a thing of beauty! It's absolutely perfect and you've made my day, my weekend and my next week. My boss is so thrilled with me and you and wanted me to tell you THANK YOU and if we could rank you on Yelp you'd get 5 stars!

    Thank you so much for your help, patience and sharing your incredible skill.

  13. #13
    Forum Expert 63falcondude's Avatar
    Join Date
    08-22-2016
    Location
    USA
    MS-Off Ver
    365
    Posts
    6,266

    Re: Combine "Does Not Contain" with A Sumproduct (Isnumber(Search Formula

    Great, happy to help!

+ 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. [SOLVED] Formula: =IF((ISNUMBER(SEARCH("172.29.90.",$A3)))*(ISNUMBER(SEARCH("00-00-85",$F3))),"MF
    By dude6571 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 11-04-2017, 07:36 AM
  2. 7 nested IF statements with a SEARCH added IF(ISNUMBER(SEARCH({"INSUR","AP REFUND"}
    By michaelproctor001 in forum Excel Formulas & Functions
    Replies: 15
    Last Post: 12-10-2013, 02:13 PM
  3. Replies: 6
    Last Post: 02-25-2013, 03:16 AM
  4. Required "IF(ISNUMBER(SEARCH" related formula
    By nur2544 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-21-2013, 11:39 AM
  5. Alternative to nesting formula? "IF(ISNUMBER(SEARCH"
    By ad9051 in forum Excel Programming / VBA / Macros
    Replies: 15
    Last Post: 03-19-2012, 06:12 AM
  6. using "isnumber(search" for a range of numbers
    By redhead522 in forum Excel General
    Replies: 5
    Last Post: 07-23-2009, 12:14 PM
  7. SUMPRODUCT(--ISNUMBER(FIND("AM",C5:160))*(k5:k160="")
    By redneck joe in forum Excel General
    Replies: 5
    Last Post: 08-18-2006, 03:31 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