+ Reply to Thread
Results 1 to 11 of 11

Lookup query

Hybrid View

  1. #1
    Registered User
    Join Date
    01-28-2014
    Location
    Manchester, England
    MS-Off Ver
    Excel 2013
    Posts
    6

    Lookup query

    Hi guys,

    I have a long list of company names on an excel spreadsheet, around 122,000 records. Instead of individually going through each record, i wondered if there is a way to automate my request with a formula. Column D has the name of the company, and Column F will display a 0 if the company name includes the word/keyword 'broadband'. Do you guys know a quick way of doing this? Many thanks!

    Jake

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

    Re: Lookup query

    Put this in F1:

    =IF(ISNUMBER(SEARCH("broadband",A1)),0,"some other message")

    You can replace "some other message" with "" if you want an empty cell - you didn't specify.

    Copy down to the bottom of your list.

    Hope this helps.

    Pete

  3. #3
    Registered User
    Join Date
    01-28-2014
    Location
    Manchester, England
    MS-Off Ver
    Excel 2013
    Posts
    6

    Re: Lookup query

    Thank you sooooo much!!!

    Is there a way to search if there are multiple keywords, for example:

    =IF(ISNUMBER(SEARCH("broadband", "network", "internet", "domain",D1)),0,"1")

    Many Thanks

  4. #4
    Forum Contributor
    Join Date
    01-22-2014
    Location
    genoa, italy
    MS-Off Ver
    Excel 2007
    Posts
    134

    Re: Lookup query

    hi,
    here ( http://wikisend.com/download/988248/broadband.xlsx ) is the solution I'm proposing.
    AL

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

    Re: Lookup query

    @AL1976,

    you don't really need the asterisks around the word broadband.

    Pete

  6. #6
    Forum Contributor
    Join Date
    01-22-2014
    Location
    genoa, italy
    MS-Off Ver
    Excel 2007
    Posts
    134

    Re: Lookup query

    thanks Pete :-)

    Quote Originally Posted by Pete_UK View Post
    @AL1976,

    you don't really need the asterisks around the word broadband.

    Pete

  7. #7
    Registered User
    Join Date
    01-28-2014
    Location
    Manchester, England
    MS-Off Ver
    Excel 2013
    Posts
    6

    Re: Lookup query

    Is there a way to search if there are multiple keywords, for example:

    =IF(ISNUMBER(SEARCH("broadband", "network", "internet", "domain",D1)),0,"1")

    Many Thanks

  8. #8
    Forum Contributor
    Join Date
    01-22-2014
    Location
    genoa, italy
    MS-Off Ver
    Excel 2007
    Posts
    134

    Re: Lookup query

    if ALL keywords must be present, replace OR by AND

  9. #9
    Forum Contributor
    Join Date
    01-22-2014
    Location
    genoa, italy
    MS-Off Ver
    Excel 2007
    Posts
    134

    Re: Lookup query

    =IF(OR(ISNUMBER(SEARCH("broadband",D1)),ISNUMBER(SEARCH("network",D1)),ISNUMBER(SEARCH("internet",D1)),ISNUMBER(SEARCH("domain",D1)))=true,0,"1")

  10. #10
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: Lookup query

    Or, slightly more succinct (for the OR version):

    =IF(COUNT(SEARCH({"broadband","network","internet","domain"},D1)),0,1)

    Regards
    Click * below if this answer helped

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

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

    Re: Lookup query

    Here's another one...

    =--(SUM(COUNTIF(D1,"*"&{"broadband","network","internet","domain"}&"*"))=0)

    Or, using cells to hold the keywords:

    A1 = Broadband
    A2 = Network
    A3 = Internet
    A4 = Domain

    Then, one of these:

    =--(SUMPRODUCT(--ISNUMBER(SEARCH(A1:A4,D1)))=0)

    =--(SUMPRODUCT(COUNTIF(D1,"*"&A1:A4&"*"))=0)
    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. Lookup Query
    By joepmcewen in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-30-2013, 05:53 AM
  2. Replies: 8
    Last Post: 08-06-2010, 07:27 AM
  3. LOOKUP Query
    By carlosbourn in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 11-04-2008, 10:35 AM
  4. Lookup/Query Help
    By spartyms2 in forum Excel General
    Replies: 1
    Last Post: 08-03-2007, 02:35 AM
  5. Lookup query
    By Hywel in forum Excel General
    Replies: 1
    Last Post: 03-03-2005, 09:45 AM

Tags for this Thread

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