Results 1 to 4 of 4

How to get different outputs from sets of keywords

Threaded View

  1. #1
    Registered User
    Join Date
    10-29-2011
    Location
    Ldn
    MS-Off Ver
    Excel 2003
    Posts
    5

    How to get different outputs from sets of keywords

    So I have a table of roughly 200 internet search keywords from two different companies, which I want to sort. One is Walmart the other is Costco.
    So keywords might look something like this:
    "Walmart Canada"
    "Walmart groceries"
    "Walmart"
    "Costco Canada"
    "Costco"
    "Costco bulk prices"
    and so on.

    In column B, I want to display the following numbers: 1 if it refers to Walmart, 2 if it refers to Costco and 3 if it contain a keyword that refers to BOTH. So in this case it should show:
    3 (Canada it common to both)
    1
    1
    3 (Canada is common to both)
    2
    2

    What I'm having trouble with is displaying the 3's. These are different approaches I've been taking:
    =IF(ISNA(VLOOKUP("walmart",A3:C103,1,FALSE)),1,IF(ISNA(VLOOKUP("groceries",A3:C103,1,TRUE)),1,IF(ISNA(VLOOKUP("Costco",A3:C103,1,FALSE)),3,2)))

    OR

    =IF(AND(NOT(ISNA(MATCH(A2,walmart!$A$2:$A$102,0))),NOT(ISNA(MATCH(A2,costco!$A$2:$A$102,0)))),2,IF(NOT(ISNA(MATCH(A2,walmart!$A$2:$A$102,0))),1,IF(NOT(ISNA(MATCH(A2,walmart!$A$2:$A$102,0))),,2)))

    In the first case, it works but I can't get 3's to show up, and I need too many words for the formula to work (given that I have so many keywords). I've used to formula with a much greater number of words but given all the words, it won't work.

    In the second case, I can get 1's and 2's, but once more the 3's won't show. It's as if "walmart" will take precedence over "canada", so it'll mark it as a 1. I've tried simply with If and vlookup but this is starting to frustrate me.

    Thanks in advance for any input.

    -B
    Last edited by Bitteeinbit; 10-31-2011 at 04:45 PM.

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