Reputation: 63
I have a SQL query to determine whether a record is from a particular data company or not.
The SQL code goes like -
CASE WHEN COL_Category in ('A',B')
OR (COL_Name like '%Apple%)
OR (COL_Name like '%Ball%)
THEN 'YES'
ELSE 'NO'
And I am trying to get the logic to work in excel for the column "Yes/No?"
COL_Category | COL_Name | Yes/No? |
---|---|---|
A | Apple | Yes |
B | Cat | Yes |
C | Dog | No |
C | Apple | Yes |
D | Cat | No |
Upvotes: 1
Views: 185
Reputation: 63
I think I figured it out. Answering for future reference.
A combination of IF(), ISNUMBER(SEARCH()), and OR() can be used to achieve the result.
Upvotes: 1